bartek@aws: ~/news
$ whoami
$ AWS Architect · DevOps · Cloud
Thursday, October 22, 2026

AWS SAM CLI Command Injection Vulnerability Requires Immediate Update

AWS SAM CLI versions 1.63.0 through 1.166.1 have a nasty OS command injection flaw in the Terraform hook that could let attackers execute arbitrary commands during builds. The vulnerability lurks in how the tool handles Terraform resource addresses without properly escaping shell metacharacters. If you're using sam build --hook-name terraform, you need to update immediately—especially if untrusted folks can modify your Terraform configs. This is a serious one that demands your attention.

source: [aws/security-bulletin]