CVE-2026-115414 - OS Command Injection Issue in SAM CLI Terraform Hook
Bulletin ID: 2026-145-AWS
Scope: AWS
Content Type: Important (requires attention)
Publication Date: 10/22/2026 11:30 AM PDT
Description:
AWS SAM CLI is an open-source framework for building serverless applications. We identified CVE-2026-115414, an OS command injection issue in the Terraform hook (sam build --hook-name terraform) in AWS SAM CLI. The Terraform hook generates a Makefile recipe that interpolates a Terraform resource address without fully neutralizing shell metacharacters, which could allow an actor who can influence the Terraform configuration or plan file consumed by a build to execute arbitrary commands as the build user on the host running the build.
Impacted versions: >=1.63.0, <=1.166.1
Resolution:
This issue has been addressed in AWS SAM CLI version v1.166.2. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes..
Workarounds:
Ensure that Terraform configuration files and plan files consumed by sam build --hook-name terraform come only from trusted sources, and audit third-party Terraform modules and shared repositories that supply input to the build. Upgrading to a fixed version is the recommended remediation.
References:
Acknowledgement:
We would like to thank Shubham Raj of Cipher by Causal Security for collaborating on this issue through the coordinated vulnerability disclosure process.
Please email aws-security@amazon.com with any security questions or concerns.