Skip to content

← Actionable
Medium, CVSS 5.7amended

AWS CDK CLI prints AWS credentials retrieved by custom credential plugins

CVE-2025-2598GHSA-v63m-x9r9-8gqp

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (cdk 2.178.2; aws-cdk 2.178.2), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm cdk

    Affected
    >= 2.172.0, < 2.178.2
    Fixed in
    2.178.2
  • npm aws-cdk

    Affected
    >= 2.172.0, < 2.178.2
    Fixed in
    2.178.2

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
5.7 · 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 · score source
EPSS
  • CVE-2025-2598: 0.31% estimated exploitation activity in the next 30 days; percentile 23.92 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary The AWS Cloud Development Kit (AWS CDK) [1] is an open-source software development framework for defining cloud infrastructure in code and provisioning it through AWS CloudFormation. The AWS CDK CLI [2] is a command line tool for interacting with CDK applications. Customers can use the CDK CLI to create, manage, and deploy their AWS CDK projects. An issue exists in the AWS CDK CLI where, under certain conditions, AWS credentials may be returned in the console output. Plugins that return an expiration property in the credentials object are affected by this issue. Plugins that omit the expiration property are not affected. Impact When customers run AWS CDK CLI commands with credential plugins and configure those plugins to return temporary credentials by including an expiration property, the AWS credentials retrieved by the plugin may be returned in the console output. Any user with access where the CDK CLI was ran would have access to this output. The following are examples of…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from ghsa record GHSA-v63m-x9r9-8gqp

  2. Revision 2 · amended ·

    Reviewed OSV alias/range/CVSS4 correction; package source scopes and original publication preserved. No customer finding resolved.

  3. Revision 1 · created ·

    Published from osv record GHSA-v63m-x9r9-8gqp

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2025-2598

Advisory: AWS CDK CLI prints AWS credentials retrieved by custom credential plugins
IDs: CVE-2025-2598, GHSA-v63m-x9r9-8gqp
Record: https://patchnext.com/advisories/cve-2025-2598 (revision 3, source checked 26 Oct 2026, 12:38 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.7)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: cdk 2.178.2; aws-cdk 2.178.2. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm cdk: affected >= 2.172.0, < 2.178.2; fixed in 2.178.2
- npm aws-cdk: affected >= 2.172.0, < 2.178.2; fixed in 2.178.2

## Suggested inspection (read-only)
- `npm ls cdk --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.
- `npm ls aws-cdk --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on cdk, aws-cdk.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-v63m-x9r9-8gqp (OSV record GHSA-v63m-x9r9-8gqp lists affected ranges: npm aws-cdk >=2.172.0 =2.172.0 <2.178.2 (fixed))
- Verified: https://github.com/advisories/GHSA-v63m-x9r9-8gqp (GitHub-reviewed advisory GHSA-v63m-x9r9-8gqp lists affected ranges: npm aws-cdk >=2.172.0 =2.172.0 <2.178.2)

Commands are suggestions: review each one before running it.

Loading voting…