CVE-2025-3047 Path Traversal in AWS SAM CLI allows file copy to build container
- Exploited in the wild
- Not known
- Fix
- Available
What is CVE-2025-3047?
CVE-2025-3047 is a medium-severity vulnerability in AWS Serverless Application Model Command Line Interface, published on 31 Mar 2025.
Official description
When running the AWS Serverless Application Model Command Line Interface (SAM CLI) build process with Docker and symlinks are included in the build files, the container environment allows a user to access privileged files on the host by leveraging the elevated permissions granted to the tool. A user could leverage the elevated permissions to access restricted files via symlinks and copy them to a more permissive location on the container.
Users should upgrade to v1.133.0 or newer and ensure any forked or derivative code is patched to incorporate the new fixes.
Weakness: CWE-61
Which versions are affected by CVE-2025-3047?
3 open source packages ship an affected version, including aws-sam-cli.
| Package | Affected | Fixed in |
|---|---|---|
aws-sam-cli PyPI | All versions | 1.133.0 |
aws-sam-cli PyPI | All versions | 1.133.0 |
aws-sam-cli PyPI | All versions | 1.133.0 |
How do I fix CVE-2025-3047?
Upgrade aws-sam-cli to 1.133.0 or later.
Is CVE-2025-3047 being exploited?
There is no known exploitation of CVE-2025-3047 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-px37-jpqx-97q9, PYSEC-2026-1207.