🇰🇷 한글 설명
Node.js의 decompress 패키지에서 압축 해제 시 대상 디렉토리 외부의 파일이나 링크를 생성할 수 있는 취약점이 발견되었습니다. 심볼릭 링크 및 하드링크 생성 시 경로 검증이 미흡하고 파일 모드 설정이 제대로 이루어지지 않아 발생합니다. 이로 인해 공격자는 의도치 않은 경로에 파일을 읽거나 쓸 수 있습니다.
💡 쉬운 설명
압축 파일을 풀 때, 압축 파일 안에 숨겨진 '가짜 길(링크)'을 이용해 컴퓨터의 중요한 폴더에 파일을 몰래 만들거나 수정할 수 있는 문제입니다. 마치 압축을 풀었는데 지정한 폴더가 아닌 엉뚱한 시스템 폴더에 파일이 생기는 것과 같습니다.
🇺🇸 원문 (English)
The decompress package for Node.js extracts archives. Prior to 10.2.1 and 11.1.3, archive extraction can create files and links outside the target directory. When extracting an archive to a directory, a crafted archive can read or write files outside that directory because hardlink and symlink entries are created without checking where targets point, path containment used a string prefix comparison, and file modes failed to remove setuid, setgid, or sticky bits. This issue is fixed in @xhmikosr/decompress versions 10.2.1 and 11.1.3.
📍 영향받는 시스템
@xhmikosr/decompress versions < 10.2.1 and < 11.1.3
⚔️ 공격 벡터
조작된 심볼릭 링크 또는 하드링크가 포함된 압축 파일을 배포하여 대상 시스템의 경로 외부 파일에 접근
🛡️ 대응 방법
@xhmikosr/decompress 패키지를 10.2.1 또는 11.1.3 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 결과에서 decompress의 버전이 10.2.1 또는 11.1.3보다 낮은지 확인
npm list @xhmikosr/decompress