CVE-2025-2598 AWS CDK CLI prints AWS credentials retrieved by custom credential plugins
AWS CDK CLI leaks AWS credentials to console output when using specific credential plugins, requiring an upgrade to secure sensitive data.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-2598?
CVE-2025-2598 is a medium-severity vulnerability in AWS Cloud Development Kit Command Line Interface, published on 21 Mar 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
When the AWS Cloud Development Kit (AWS CDK) Command Line Interface (AWS CDK CLI) is used with a credential plugin which returns an expiration property with the retrieved AWS credentials, the credentials are printed to the console output. To mitigate this issue, users should upgrade to version 2.178.2 or later and ensure any forked or derivative code is patched to incorporate the new fixes.
Weakness: CWE-497
Which versions are affected by CVE-2025-2598?
4 open source packages ship an affected version, including aws-cdk and cdk. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
aws-cdk npm | From 2.172.0 | 2.178.2 |
aws-cdk npm | From 2.172.0 | 2.178.2 |
cdk npm | From 2.172.0 | 2.178.2 |
cdk npm | From 2.172.0 | 2.178.2 |
Products include Amazon Aws Cloud Development Kit.
How do I fix CVE-2025-2598?
Upgrade aws-cdk to 2.178.2 or later.
Is CVE-2025-2598 being exploited?
There is no known exploitation of CVE-2025-2598 in the wild and no public exploit code.
Public exploit code: 2 proofs of concept on GitHub.
Other vulnerabilities in AWS Cloud Development Kit Command Line Interface
Sources
Also known as GHSA-v63m-x9r9-8gqp.