Exposure of Sensitive System Information to an Unauthorized Control Sphere Affecting cdk package, versions >=2.172.0 <2.178.2


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-CDK-9510924
  • published23 Mar 2025
  • disclosed21 Mar 2025
  • creditUnknown

Introduced: 21 Mar 2025

NewCVE-2025-2598  (opens in a new tab)
CWE-497  (opens in a new tab)

How to fix?

Upgrade cdk to version 2.178.2 or higher.

Overview

cdk is an AWS CDK Toolkit

Affected versions of this package are vulnerable to Exposure of Sensitive System Information to an Unauthorized Control Sphere through the expiration property in the credentials object. An attacker can gain access to AWS credentials by configuring a credential plugin to include this property.

Note:

Plugins that omit the expiration property are not vulnerable by this issue.

Workaround

Remove the expiration property from the object returned by the plugin.

Note that this will prevent the CDK CLI from refreshing the credentials when needed, and may cause your workflow to fail on an expired credentials error.

return {
    accessKeyId: assumeRoleOutput.Credentials.AccessKeyId,
    secretAccessKey: assumeRoleOutput.Credentials.SecretAccessKey,
    sessionToken:

CVSS Base Scores

version 4.0
version 3.1