AWS SAM CLI 1.166.2 Fixes Terraform Hook Command Injection

P2 — VALIDATE AND UPDATENot provided by the authority · Not provided by the authorityEXPLOITATION: NOT STATED

Quick Answer

AWS bulletin 2026-145-AWS fixes CVE-2026-115414 in SAM CLI 1.63.0 through 1.166.1. Upgrade to 1.166.2 or later, review Terraform inputs and derivative code, validate build pipelines, and retain evidence.

Confirm Scope And Apply The Supported Remediation

What to do now: Inventory SAM CLI versions, Terraform-hook use, CI runners, shared modules, plan-file sources, forks, credentials, and owners. Confirm whether a vulnerable CLI consumed configuration or plan files outside the trusted build boundary; do not infer exposure from SAM CLI presence alone. Upgrade to SAM CLI 1.166.2 or later and incorporate the fix into maintained forks; until then, accept Terraform inputs only from trusted sources. Confirm the active CLI on every runner, rebuild representative projects, inspect anomalous build-host activity where untrusted input was possible, and retain package and pipeline evidence.

Open the authoritative advisory

Last verified: 2026-10-23 UTC. Recheck the authoritative advisory and supported distribution channel before changing production.

Scope And Authority

Product scopeAWS Serverless Application Model CLI Terraform hook
Advisory2026-145-AWS
CVECVE-2026-115414
Authoritative release date2026-10-22 18:50:58 UTC
Authority revision date2026-10-22 18:50:58 UTC
Affected versionsAWS SAM CLI 1.63.0 through 1.166.1 when sam build --hook-name terraform consumes attacker-controlled Terraform configuration or plan files.
Fixed versionAWS SAM CLI 1.166.2 or later
CVSS base scoreNot provided by the authority
CVSS severityNot provided by the authority
Exploitation statusAWS does not state that this issue is being maliciously exploited.; no exploitation claim is inferred.

What Changed

AWS fixed OS command injection in the SAM CLI Terraform hook. A crafted Terraform configuration or plan can cause command execution as the user running the build.

What To Validate Now

  1. Inventory. Inventory SAM CLI versions, Terraform-hook use, CI runners, shared modules, plan-file sources, forks, credentials, and owners.
  2. Establish applicability. Confirm whether a vulnerable CLI consumed configuration or plan files outside the trusted build boundary; do not infer exposure from SAM CLI presence alone.
  3. Remediate. Upgrade to SAM CLI 1.166.2 or later and incorporate the fix into maintained forks; until then, accept Terraform inputs only from trusted sources.
  4. Validate. Confirm the active CLI on every runner, rebuild representative projects, inspect anomalous build-host activity where untrusted input was possible, and retain package and pipeline evidence.
  5. Retain evidence. Preserve asset and owner identifiers, the applicability decision, before-and-after versions, change approval, installation output, validation results, and any exception or rollback record.

Operational Cautions

The command runs with the build user's privileges. Treat shared runners and stored cloud credentials as separate exposure questions, and do not regard input allowlisting as the complete remediation.

Evidence To Retain

  • Exact product, release stream, package or application version, enabled feature, environment, and accountable owner.
  • UTC timestamps, authority revision, approved change record, installer or package-manager output, and resulting version.
  • Relevant logs and monitoring evidence, test results, exceptions, compensating controls, and rollback decisions.

Related TechGeeks Resources

Authoritative References

Correction policy: If the authority changes affected versions, fixed versions, severity, exploitation information, mitigations, or required action, TechGeeks will update this notice and its verification date.