AWS SAM CLI v<1.133.0 Symlink Privileged Host File Access via Docker build
CVE-2025-3047 Published on March 31, 2025

Path Traversal in AWS SAM CLI allows file copy to build container
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.

Github Repository Vendor Advisory NVD

Vulnerability Analysis

CVE-2025-3047 can be exploited with network access, requires user interaction. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to have a high impact on confidentiality, with no impact on integrity and availability.

Attack Vector:
NETWORK
Attack Complexity:
LOW
Privileges Required:
NONE
User Interaction:
REQUIRED
Scope:
UNCHANGED
Confidentiality Impact:
HIGH
Integrity Impact:
NONE
Availability Impact:
NONE

Weakness Type

What is a Symlink following Vulnerability?

The software, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. This could allow an attacker to cause the software to operate on unauthorized files. A software system that allows UNIX symbolic links (symlink) as part of paths whether in internal code or through user input can allow an attacker to spoof the symbolic link and traverse the file system to unintended locations or access arbitrary files. The symbolic link can permit an attacker to read/write/corrupt a file that they originally did not have permissions to access.

CVE-2025-3047 has been classified to as a Symlink following vulnerability or weakness.


Products Associated with CVE-2025-3047

Want to know whenever a new CVE is published for Amazon Aws? stack.watch will email you.

 

Affected Versions

AWS Serverless Application Model Command Line Interface:

Vulnerable Packages

The following package name and versions may be associated with CVE-2025-3047

Package Manager Vulnerable Package Versions Fixed In
pip aws-sam-cli < 1.133.0 1.133.0

Exploit Probability

EPSS
0.11%
Percentile
29.20%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.