CVE-2025-3048 Path Traversal in AWS SAM CLI allows file copy to local cache

Medium 6.9 Published Updated

AWS SAM CLI copies symlinked files to local cache, allowing unauthorized users to read sensitive files accessible only within the Docker container.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-3048?

CVE-2025-3048 is a medium-severity path traversal vulnerability in AWS Serverless Application Model Command Line Interface, published on 31 Mar 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

After completing a build with AWS Serverless Application Model Command Line Interface (SAM CLI) which include symlinks, the content of those symlinks are copied to the cache of the local workspace as regular files or directories. As a result, a user who does not have access to those symlinks outside of the Docker container would now have access via the local workspace.

Users should upgrade to version 1.134.0 and ensure any forked or derivative code is patched to incorporate the new fixes. After upgrading, users must re-build their applications using the sam build --use-container to update the symlinks.

Weakness: CWE-61

Which versions are affected by CVE-2025-3048?

3 open source packages ship an affected version, including aws-sam-cli.

PackageAffectedFixed in
aws-sam-cli PyPIAll versions1.134.0
aws-sam-cli PyPIAll versions1.134.0
aws-sam-cli PyPIAll versions1.134.0

How do I fix CVE-2025-3048?

Upgrade aws-sam-cli to 1.134.0 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2025-3048 being exploited?

There is no known exploitation of CVE-2025-3048 in the wild and no public exploit code.

Sources

Also known as GHSA-pp64-wj43-xqcr, PYSEC-2026-1206.

Is CVE-2025-3048 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free