Vulnerabilities in pkg:pypi/aws-sam-cli
PACKAGECVE-2025-3048 is a MODERATE (CVSS 6.5) path traversal vulnerability (CWE-61: UNIX Symbolic Link (Symlink) Following) affecting Aws sam cli libraries in the PyPI ecosystem. The issue involves aws sam cli path traversal allows file copy to local cache. Remediation is available by upgrading affected packages to version 1.134.0.
pkg:pypi/aws-sam-cli
Vulnerability advisories affecting package pkg:pypi/aws-sam-cli. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-pp64-wj43-xqcr | CVE-2025-3048 | MODERATE | AWS SAM CLI Path Traversal allows file copy to local cache |
| GHSA-px37-jpqx-97q9 | CVE-2025-3047 | MODERATE | AWS SAM CLI Path Traversal allows file copy to build container |
| GHSA-rjc6-vm4h-85cg | - | MODERATE | Sensitive Information Exposure Through Insecure Logging For Secrets Like Metadata.DockerBuildArgs |
CVE-2025-3048 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N).
How to Fix CVE-2025-3048
To remediate this vulnerability, upgrade all affected Aws sam cli dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install aws-sam-cli>=1.134.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show aws-sam-cli
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-3048, inspect your installed packages using pip:
pip show aws-sam-cli
Analyze the terminal output to locate any version of Aws sam cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.134.0), your application is affected.
Note: The pip show aws-sam-cli command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-61: UNIX Symbolic Link (Symlink) Following, where the product, 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 product to operate on unauthorized files. In Aws sam cli, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-3048 Affected Aws sam cli Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
aws-sam-cli
|
PyPI |
< 1.134.0
|
1.134.0
|
References
Frequently Asked Questions
What is CVE-2025-3048?
Which Aws sam cli versions are affected?
What version fixes CVE-2025-3048?
Is aws-sam-cli affected?
What is the CVSS score of CVE-2025-3048?
What CWE is associated with CVE-2025-3048?
How can I check PyPI dependencies for CVE-2025-3048?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pp64-wj43-xqcr",
"modified" : "2025-10-14T21:59:12Z",
"published" : "2025-03-31T22:36:52Z",
"aliases" : [ "CVE-2025-3048" ],
"summary" : "AWS SAM CLI Path Traversal allows file copy to local cache",
"details" : "### Summary\n\nThe [AWS Serverless Application Model Command Line Interface (AWS SAM CLI)](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/using-sam-cli.html) is an open-source CLI tool that helps Lambda developers to build and develop Lambda applications locally on their computers using Docker.\n\nAfter completing a build with AWS 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.\n\nUsers should [upgrade to v1.134.0 or newer](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/manage-sam-cli-versions.html#manage-sam-cli-versions-upgrade) 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.\n\n\n\n### Impact\n\nThe issue is limited to the local workspace and does not affect AWS services, production environments or cross-account resources. The issue only affects workspaces using the AWS SAM CLI with container builds (--use-container), potentially allowing access to content of linked files in the SAM CLI cache.\n\n\n\n**Impacted versions:** <= AWS SAM CLI v1.133.0\n\n\n\n### Patches\n\nThe patches are included in AWS SAM CLI version to v1.134.0 and newer. Users should upgrade 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\n\n\n\n### Workarounds\n\nThere is no recommended work around. Customers are advised to upgrade to version v1.134.0 or the latest version.\n\n\n\n### References\n\nCVE-2025-3048\n\n---\n\nIf you have any questions or comments about this advisory we ask that you contact AWS/Amazon Security via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting) or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.\n\n\n\n### Credit\n\nWe would like to thank [Kevin Backhouse](https://github.com/kevinbackhouse) with the GitHub Security Lab for collaborating on this issue through the coordinated vulnerability disclosure process.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "aws-sam-cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.134.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/aws/aws-sam-cli/security/advisories/GHSA-pp64-wj43-xqcr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-3048"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-sam-cli/pull/7890"
}, {
"type" : "WEB",
"url" : "https://aws.amazon.com/security/security-bulletins/AWS-2025-008"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/aws/aws-sam-cli"
}, {
"type" : "WEB",
"url" : "https://github.com/aws/aws-sam-cli/releases/tag/v1.134.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-61" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-31T22:36:52Z",
"nvd_published_at" : "2025-03-31T16:15:27Z"
}
}