Impact
The vulnerability is an operating system command injection in the Terraform hook of AWS SAM CLI versions earlier than 1.166.2. By tampering with the Terraform configuration or plan file that the CLI consumes, an attacker who can influence that file can cause the CLI to execute arbitrary commands as the user running the build on the host machine. This flaw is a classic example of CWE‑78 and results in remote code execution on the build host.
Affected Systems
The affected product is AWS SAM CLI from the AWS vendor. All releases prior to 1.166.2 are impacted, including any instance where the CLI processes Terraform configuration or plan files supplied by a build process. Clients running older versions on any operating system are susceptible if they accept untrusted Terraform artifacts.
Risk and Exploitability
With a CVSS score of 8.4 the vulnerability is considered high severity. EPSS data is not available, but the lack of a KEV listing does not diminish the risk for organizations that build using SAM CLI in potentially untrusted environments. An attacker who can inject malicious content into a Terraform file or plan can trigger the injection when the CLI runs the build, thereby executing commands with the host user’s privileges. The attack vector is local to the build host, requiring attacker control over the build configuration files.
OpenCVE Enrichment