CVE-2026-11417: OS Command Injection in NodejsFunction Bundling in aws-cdk-lib

Published Jun 10, 2026
·
Updated

Summary AWS 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.

Impact During 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.

Impacted versions: < 2.245.0 (on Windows, < 2.246.0)

Patches This 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.

Workarounds Ensure 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.

References If you have any questions or comments about this advisory, we ask that you contact AWS Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.

Acknowledgement AWS 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.

Other sources

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.

To remediate this issue, users should upgrade to aws-cdk-lib 2.245.0 (2.246.0 on Windows) or later.

— NVD

Affected Software

2 affected componentsFixes available
npm/aws-cdk-lib<2.245.0, <2.246.0
npm/aws-cdk-lib<2.246.0
2.246.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/aws-cdk-lib to a version that resolves this vulnerability.

    Fixed in 2.246.0
  2. Upgrade

    Upgrade npm/aws-cdk-lib to a version that resolves this vulnerability.

    Fixed in 2.245.0
  3. Compensating control

    Ensure values supplied to NodejsFunction bundling properties (externalModules, define, loader, inject, esbuildArgs) originate only from trusted sources; audit third-party constructs and pull requests that set these properties to avoid untrusted/controlled inputs.

  4. Operational

    Ensure any forked or derivative copies of aws-cdk-lib are patched to incorporate the fixes (see PR #37292 and Windows regression fix PR #37412) so they no longer perform shell-based command execution during bundling.

Event History

Jun 10, 2026
CVE Published
via MITRE·05:39 PM
Data Sourced
via MITRE·05:39 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeakness
Jun 15, 2026
Advisory Published
via GitHub·08:47 PM
Data Sourced
via GitHub·08:47 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-11417?

The severity of CVE-2026-11417 is rated as high with a score of 7.3.

2

What is the risk associated with CVE-2026-11417?

CVE-2026-11417 has a risk rating of 64, indicating a significant potential impact if exploited.

3

How do I fix CVE-2026-11417?

To fix CVE-2026-11417, upgrade aws-cdk-lib to version 2.245.0 or later (2.246.0 on Windows).

4

What type of vulnerability is CVE-2026-11417?

CVE-2026-11417 is an OS Command Injection vulnerability which allows execution of arbitrary commands on the host.

5

What components are affected by CVE-2026-11417?

The affected components include the NodejsFunction local bundling pipeline in aws-cdk-lib versions before 2.245.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203