CVE-2026-13760: aws-cdk-lib OS Command Injection Vulnerability
HIGHCVE-2026-13760 is a HIGH (CVSS 7.3) os command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting aws-cdk-lib libraries in the npm ecosystem. The issue involves os command injection in nodejsfunction docker bundling. Remediation is available by upgrading affected packages to version 2.260.0.
CVE-2026-13760 at a Glance
Security Impact
CVSS: 7.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-13760
To remediate this vulnerability, upgrade all affected aws-cdk-lib dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install aws-cdk-lib@2.260.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls aws-cdk-lib
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-13760, inspect your project dependencies using npm:
npm ls aws-cdk-lib
Analyze the terminal output to locate any version of aws-cdk-lib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.260.0), your application is affected.
Note: The npm ls aws-cdk-lib command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In aws-cdk-lib, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-13760 Affected aws-cdk-lib Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
aws-cdk-lib
|
npm |
< 2.260.0
|
2.260.0
|
References
Frequently Asked Questions
What is CVE-2026-13760?
Which aws-cdk-lib versions are affected?
What version fixes CVE-2026-13760?
Is aws-cdk-lib affected?
What is the CVSS score of CVE-2026-13760?
What CWE is associated with CVE-2026-13760?
How can I check npm dependencies for CVE-2026-13760?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vcrf-j523-4mrf",
"modified" : "2026-07-21T19:04:50Z",
"published" : "2026-07-21T19:04:50Z",
"aliases" : [ "CVE-2026-13760" ],
"summary" : "aws-cdk-lib: OS Command Injection in NodejsFunction Docker Bundling",
"details" : "### Summary\nAWS CDK (aws-cdk-lib) is an open-source framework for defining cloud infrastructure in code and provisioning it through AWS CloudFormation. OS command injection issue in the NodejsFunction Docker bundling pipeline in aws-cdk-lib before 2.260.0 that might allow an actor who controls dependency version strings in a project's package.json file to execute arbitrary commands on the host running the CDK toolchain via injected shell metacharacters in the OsCommand helper. This issue requires the actor to control the content of a package.json dependency version string that is processed during Docker-based bundling with nodeModules specified.\n\n### Impact\nDuring Docker-based Lambda bundling, when the nodeModules option is specified, NodejsFunction assembled a shell command string, including file-operation commands generated by an internal OsCommand helper, from the version strings of the modules listed in nodeModules, and executed it via a shell (bash -c) inside the bundling container. These version strings were interpolated without shell escaping, so values containing shell metacharacters could execute arbitrary commands inside the bundling container - which has read/write bind mounts to the host filesystem - with the privileges of the user running cdk synth, cdk deploy, or cdk diff. Leveraging this issue requires an actor to control a dependency version string for one of the listed modules - for example via an untrusted npm package referenced through nodeModules.\n\n### Impacted versions: \n< 2.260.0\n\n### Patches\nThis issue has been addressed in aws-cdk-lib version 2.260.0 (PR [#38133](https://github.com/aws/aws-cdk/pull/38133)). We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes. \n\n### Workarounds\nEnsure that the modules listed in the nodeModules bundling option - and the version strings declared for them in your project's package.json, as well as the versions of the corresponding installed packages - come only from trusted sources, and audit third-party constructs and dependencies that introduce them. Using local bundling instead of Docker-based bundling avoids the affected code path. Upgrading to a fixed version is the recommended remediation.\n\n### References\nIf you have any questions or comments about this advisory, we ask that you contact AWS Security via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting) or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.\n\n### Acknowledgement\nWe would like to thank the external researcher Mostafa Ashraf who reported this issue through the AWS Vulnerability Disclosure Program (HackerOne [@kaporia](https://hackerone.com/kaporia)) for collaborating on it through the coordinated vulnerability disclosure process.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "aws-cdk-lib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.260.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/aws/aws-cdk/security/advisories/GHSA-vcrf-j523-4mrf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-13760"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-cdk/pull/38133"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-cdk/commit/baa9e1dff469306cc23b8f4bd232d703f98bf68a"
}, {
"type" : "WEB",
"url" : "https://aws.amazon.com/security/security-bulletins/2026-050-aws"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/aws/aws-cdk"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-cdk/releases/tag/v2.260.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-21T19:04:50Z",
"nvd_published_at" : "2026-07-01T19:16:36Z"
}
}