{"answers":{"affected":"3 open source packages ship an affected version, including aws-sam-cli.","exploited":"There is no known exploitation of CVE-2025-3047 in the wild and no public exploit code.","fix":"Upgrade aws-sam-cli to 1.133.0 or later.","what":"CVE-2025-3047 is a medium-severity vulnerability in AWS Serverless Application Model Command Line Interface, published on 31 Mar 2025."},"fix_prompt":"Check this codebase for CVE-2025-3047 and fix it if it is affected.\n\nWhat it is: CVE-2025-3047 is a medium-severity vulnerability in AWS Serverless Application Model Command Line Interface, published on 31 Mar 2025. \nExploitation: There is no known exploitation of CVE-2025-3047 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- aws-sam-cli (PyPI): affected all versions; fixed in 1.133.0\n- aws-sam-cli (PyPI): affected all versions; fixed in 1.133.0\n- aws-sam-cli (PyPI): affected all versions; fixed in 1.133.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-3047/ (Markdown: https://insights.sbomify.com/CVE-2025-3047/index.md)","id":"CVE-2025-3047","markdown":"https://insights.sbomify.com/CVE-2025-3047/index.md","name":"CVE-2025-3047","record":{"aliases":["GHSA-px37-jpqx-97q9","PYSEC-2026-1207"],"analysis":null,"analysis_generated_by":null,"assigner":"AMZN","cpe":[],"cvss":{"score":6.9,"severity":"medium","source":"cna","vector":"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","version":"4.0"},"cwes":[{"id":"CWE-61","name":"UNIX Symbolic Link (Symlink) Following"}],"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. \n\nUsers should upgrade to v1.133.0 or newer and ensure any forked or derivative code is patched to incorporate the new fixes.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2025-04-02","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-04-02T14:28:44Z","kind":"github_poc","ref":"https://github.com/murataydemir/AWS-SAM-CLI-Vulnerabilities","stars":0,"title":"Issue with AWS SAM CLI (CVE-2025-3047, CVE-2025-3048)"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Path Traversal in AWS SAM CLI allows file copy to build container","id":"CVE-2025-3047","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":null,"year":"2025"},"n_packages":3,"n_references":3,"next":{"headline":"Path Traversal in AWS SAM CLI allows file copy to local cache","id":"CVE-2025-3048"},"packages":[{"ecosystem":"PyPI","fixed":["1.133.0"],"introduced":["0"],"last_affected":[],"package":"aws-sam-cli","purl":null,"source":"GHSA-px37-jpqx-97q9"},{"ecosystem":"PyPI","fixed":["1.133.0"],"introduced":["0"],"last_affected":[],"package":"aws-sam-cli","purl":"pkg:pypi/aws-sam-cli","source":"GHSA-px37-jpqx-97q9"},{"ecosystem":"PyPI","fixed":["1.133.0"],"introduced":["0"],"last_affected":[],"package":"aws-sam-cli","purl":"pkg:pypi/aws-sam-cli","source":"PYSEC-2026-1207"}],"prev":{"headline":"Path Traversal via Symbolic Links in run-llama/llama_index","id":"CVE-2025-3046"},"products":["AWS Serverless Application Model Command Line Interface"],"published":"2025-03-31","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-10-14","vendors":["AWS"]},"summary":null,"url":"https://insights.sbomify.com/CVE-2025-3047/"}