🇰🇷 한글 설명
AWS SAM CLI에서 symlink로 보호된 파일의 내용이 로컬 workspace 캐시로 일반 파일/디렉토리로 복사되어, Docker 컨테이너 외부에서 접근 불가능한 파일들이 로컬에서 노출되는 정보 유출 취약점입니다. 권한 없는 사용자가 민감한 파일에 접근할 수 있게 됩니다.
💡 쉬운 설명
AWS SAM으로 빌드할 때 심볼릭 링크가 가리키는 파일들이 컴퓨터의 임시 폴더에 일반 파일로 복사되어 누구나 볼 수 있게 됩니다. 이는 원래 보호되어야 할 파일들이 실수로 노출되는 보안 문제입니다.
🇺🇸 원문 (English)
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.
📍 영향받는 시스템
AWS SAM CLI 1.134.0 미만 버전 (pip/npm/brew로 설치된 모든 구 버전)
⚔️ 공격 벡터
Docker 컨테이너 내 symlink로 보호된 파일에 로컬 workspace 캐시 디렉토리를 통해 직접 접근
🛡️ 대응 방법
AWS SAM CLI를 1.134.0 이상으로 업그레이드 후 sam build --use-container 실행하여 캐시 재생성
🔧 검증 코드
출력된 버전이 1.134.0 이상이면 안전하고, 미만이면 취약점 존재로 즉시 업그레이드 필요
pip show aws-sam-cli 2>/dev/null | grep Version | awk '{print $2}'