Insertion of Sensitive Information into Log File Affecting aws-cdk-lib package, versions >=2.37.0 <2.187.0


Severity

Recommended
0.0
high
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 Learn

Learn about Insertion of Sensitive Information into Log File vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-AWSCDKLIB-9576209
  • published1 Apr 2025
  • disclosed31 Mar 2025
  • creditUnknown

Introduced: 31 Mar 2025

New CVE NOT AVAILABLE CWE-532  (opens in a new tab)

How to fix?

Upgrade aws-cdk-lib to version 2.187.0 or higher.

Overview

aws-cdk-lib is a Version 2 of the AWS Cloud Development Kit library

Affected versions of this package are vulnerable to Insertion of Sensitive Information into Log File via the DescribeCognitoUserPoolClient CDK API. A user with access to the account where logs for this user pool are stored, and read permissions on the associated lambda function logs, can see the secrets generated by other users' cognito.UserPoolClient constructs.

Note: After upgrading, applications must be redeployed with the feature flag @aws-cdk/cognito:logUserPoolClientSecretValue set to false to remediate this vulnerability.

Workaround

This vulnerability can be avoided by setting Logging.withDataHidden().

References

CVSS Base Scores

version 4.0
version 3.1