{"id":"CVE-2025-3048","aliases":["CVE-2025-3048","GHSA-pp64-wj43-xqcr","PYSEC-2026-1206"],"related":[],"kind":"vulnerability","state":"published","title":"Path Traversal in AWS SAM CLI allows file copy to local cache","summary":"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.\n\nUsers 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.\n\nUsers 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.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Tras completar una compilación con la Interfaz de Línea de Comandos del Modelo de Aplicación sin Servidor de AWS (SAM CLI) que incluye enlaces simbólicos, el contenido de estos se copia a la caché del espacio de trabajo local como archivos o directorios normales. Como resultado, un usuario que no tenga acceso a estos enlaces simbólicos fuera del contenedor Docker ahora podrá acceder a través del espacio de trabajo local. Los usuarios deben actualizar a la versión 1.134.0 y asegurarse de que cualquier código bifurcado o derivado esté parcheado para incorporar las nuevas correcciones. Tras la actualización, los usuarios deben reconstruir sus aplicaciones utilizando sam build --use-container para actualizar los enlaces simbólicos.","source":"nvd"}],"published":"2025-03-31T15:21:16.205Z","modified":"2026-07-07T17:57:03.345Z","severity":{"scorer":"AMZN","scheme":"CVSS:4.0","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","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"AMZN","scheme":"CVSS:4.0","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","score":6.9,"rating":"MEDIUM"},{"scorer":"AMZN","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","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"}],"cwes":["CWE-22","CWE-61"],"affected":[{"ranges":[{"type":"semver","introduced":"1.9.0","fixed":"1.134.0","status":"affected"}],"vendor":"AWS","product":"AWS Serverless Application Model Command Line Interface","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.134.0"}],"ecosystem":"PyPI","package":"aws-sam-cli","purl":"pkg:pypi/aws-sam-cli","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.134.0"}],"ecosystem":"PyPI","package":"aws-sam-cli","purl":"pkg:pypi/aws-sam-cli","source":"pysec"}],"references":[{"url":"https://aws.amazon.com/security/security-bulletins/AWS-2025-008/","tags":["vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/aws/aws-sam-cli/security/advisories/GHSA-pp64-wj43-xqcr","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/aws/aws-sam-cli/releases/tag/v1.134.0","tags":["patch","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-3048","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/aws/aws-sam-cli/pull/7890","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://aws.amazon.com/security/security-bulletins/AWS-2025-008","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/aws/aws-sam-cli","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/aws-sam-cli","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-pp64-wj43-xqcr","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"AMZN","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-03-31T16:19:35.404Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-3048","url":"https://www.cve.org/CVERecord?id=CVE-2025-3048","licence":"CVE Terms of Use","modified":"2025-10-14T19:23:20.481Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pp64-wj43-xqcr","url":"https://github.com/advisories/GHSA-pp64-wj43-xqcr","licence":"CC-BY-4.0","modified":"2026-07-07T17:57:03.345Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-3048","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-3048","licence":"Public domain","modified":"2026-06-17T09:19:05.687Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1206","url":"https://osv.dev/vulnerability/PYSEC-2026-1206","licence":"CC-BY-4.0","modified":"2026-07-07T17:46:33.500Z"}],"updatedAt":"2026-11-25T22:58:55.737Z","epss":{"score":0.00658,"percentile":0.52768,"date":"2026-12-01T12:00:22.000Z"}}