{"id":"CVE-2026-11417","aliases":["CVE-2026-11417","GHSA-999r-qq7v-r334"],"related":[],"kind":"vulnerability","state":"published","title":"OS Command Injection in NodejsFunction Bundling in aws-cdk-lib","summary":"OS command injection in the NodejsFunction local bundling pipeline in aws-cdk-lib before 2.245.0 (2.246.0 on Windows) might allow an actor who controls the value of one or more bundling properties (externalModules, define, loader, inject, or esbuildArgs) to execute arbitrary commands on the host running the CDK toolchain via injected shell metacharacters. This issue requires the threat actor to control the value of one or more of the affected bundling properties in the CDK application.\n\n\n\nTo remediate this issue, users should upgrade to aws-cdk-lib 2.245.0 (2.246.0 on Windows) or later.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"OS command injection in the NodejsFunction local bundling pipeline in aws-cdk-lib before 2.245.0 (2.246.0 on Windows) might allow an actor who controls the value of one or more bundling properties (externalModules, define, loader, inject, or esbuildArgs) to execute arbitrary commands on the host running the CDK toolchain via injected shell metacharacters. This issue requires the threat actor to control the value of one or more of the affected bundling properties in the CDK application.\n\n\n\nTo remediate this issue, users should upgrade to aws-cdk-lib 2.245.0 (2.246.0 on Windows) or later.","source":"cvelist"},{"lang":"en","text":"### 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 in the `NodejsFunction` local bundling pipeline in `aws-cdk-lib` before 2.245.0 (2.246.0 on Windows) might allow a threat actor who controls the value of one or more bundling properties (`externalModules`, `define`, `loader`, `inject`, or `esbuildArgs`) to execute arbitrary commands on the host running the CDK toolchain via injected shell metacharacters. This issue requires the threat actor to control the value of one or more of the affected bundling properties in the CDK application.\n\n### Impact\nDuring local Lambda bundling, `NodejsFunction` assembled an esbuild command string from the bundling properties `externalModules`, `define`, `loader`, `inject`, and `esbuildArgs` and executed it via a shell (`bash -c` on Linux/macOS, `cmd /c` on Windows) through `spawnSync`. The property values were interpolated without escaping or validation, so values containing shell metacharacters could execute arbitrary commands with the privileges of the user running `cdk synth`, `cdk deploy`, or `cdk diff`. Exploitation requires a threat actor to control one or more of the affected property values in the CDK application — for example via an untrusted npm dependency that vends a wrapper construct, or via a pull request that introduces untrusted values.\n\n### Impacted versions: \n< 2.245.0 (on Windows, < 2.246.0)\n\n### Patches\nThis issue has been addressed in `aws-cdk-lib` version 2.245.0 (PR #37292), with a Windows-specific regression fix in 2.246.0 (PR #37412). The fix replaces shell-based command execution with array-based `spawnSync` invocation that does not invoke a shell. 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 the values supplied to `NodejsFunction` bundling properties (`externalModules`, `define`, `loader`, `inject`, `esbuildArgs`) originate only from trusted sources, and audit third-party constructs and pull requests that set them. 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 \nAWS would like to thank the external researcher Hesham Ashraf who reported this issue through the AWS Vulnerability Disclosure Program (HackerOne) for collaborating on it through the coordinated vulnerability disclosure process.","format":"markdown","source":"ghsa"},{"lang":"es","text":"La inyección de comandos del sistema operativo en la canalización de empaquetado local de NodejsFunction en aws-cdk-lib anterior a 2.245.0 (2.246.0 en Windows) podría permitir que un actor que controla el valor de una o más propiedades de empaquetado (externalModules, define, loader, inject o esbuildArgs) ejecute comandos arbitrarios en el host que ejecuta la cadena de herramientas de CDK a través de metacaracteres de shell inyectados. Este problema requiere que el actor de la amenaza controle el valor de una o más de las propiedades de empaquetado afectadas en la aplicación CDK.\n\nPara solucionar este problema, los usuarios deben actualizar a aws-cdk-lib 2.245.0 (2.246.0 en Windows) o posterior.","source":"nvd"}],"published":"2026-06-10T17:39:18.210Z","modified":"2026-10-26T11:10:00.157Z","severity":{"scorer":"AMZN","scheme":"CVSS:4.0","vector":"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","score":7,"rating":"HIGH"},"severities":[{"scorer":"AMZN","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","score":7.3,"rating":"HIGH"},{"scorer":"AMZN","scheme":"CVSS:4.0","vector":"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","score":7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","score":7.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"type":"custom","introduced":"0","fixed":"2.245.0","status":"affected"}],"vendor":"AWS","product":"AWS Cloud Development Kit library","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.246.0"}],"ecosystem":"npm","package":"aws-cdk-lib","purl":"pkg:npm/aws-cdk-lib","source":"ghsa"}],"references":[{"url":"https://github.com/aws/aws-cdk/releases/tag/v2.245.0","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://aws.amazon.com/security/security-bulletins/2026-041-aws/","tags":["vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/aws/aws-cdk/security/advisories/GHSA-999r-qq7v-r334","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-11417","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/aws/aws-cdk/pull/37292","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/aws/aws-cdk/pull/37412","tags":["web"],"sources":["ghsa"]},{"url":"https://aws.amazon.com/security/security-bulletins/2026-041-aws","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/aws/aws-cdk","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"AMZN","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-06-10T18:17:36.634Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-11417","url":"https://www.cve.org/CVERecord?id=CVE-2026-11417","licence":"CVE Terms of Use","modified":"2026-06-10T18:17:44.552Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-999r-qq7v-r334","url":"https://github.com/advisories/GHSA-999r-qq7v-r334","licence":"CC-BY-4.0","modified":"2026-06-15T21:11:26.145Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-11417","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-11417","licence":"Public domain","modified":"2026-10-26T11:10:00.157Z"}],"updatedAt":"2026-11-25T22:59:24.344Z","epss":{"score":0.00993,"percentile":0.63562,"date":"2026-12-01T12:00:22.000Z"}}