Vulnerabilities in pkg:pypi/aws-sam-cli

PACKAGE
Advisory Identifier: GHSA-pp64-wj43-xqcr
Advisory Summary

CVE-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.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/aws-sam-cli

3 Known Advisory Record(s)

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

CVE Identifier CVE-2025-3048
GHSA Identifier GHSA-pp64-wj43-xqcr
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-61: UNIX Symbolic Link (Symlink) Following
Affected Product Aws sam cli
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

aws-sam-cli fixed: 1.134.0
pip install aws-sam-cli>=1.134.0
Verify Direct and Transitive Dependencies

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

### Summary The [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. After 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. Users 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. ### Impact The 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. **Impacted versions:** <= AWS SAM CLI v1.133.0 ### Patches The 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 ### Workarounds There is no recommended work around. Customers are advised to upgrade to version v1.134.0 or the latest version. ### References CVE-2025-3048 --- If 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. ### Credit We 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.

CVE-2025-3048 Affected Aws sam cli Versions

1 component(s)
Fixed Versions:
1.134.0
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?
CVE-2025-3048 is a security vulnerability in Aws sam cli involving AWS SAM CLI Path Traversal allows file copy to local cache under CWE-61: UNIX Symbolic Link (Symlink) Following.
Which Aws sam cli versions are affected?
Affected versions include releases prior to 1.134.0 across affected packages: aws-sam-cli.
What version fixes CVE-2025-3048?
Upgrading to 1.134.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is aws-sam-cli affected?
Yes, aws-sam-cli is affected in releases prior to 1.134.0. Upgrade your dependency to 1.134.0 or later.
What is the CVSS score of CVE-2025-3048?
CVE-2025-3048 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2025-3048?
CVE-2025-3048 is classified under CWE-61: UNIX Symbolic Link (Symlink) Following (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.).
How can I check PyPI dependencies for CVE-2025-3048?
Run the dependency tree command: 'pip show aws-sam-cli'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}