🔍 CVE-2022-29244

7.5
CVSS Score
HIGH
2022-06-13
2026-06-17 04:39
✅ 완료

🇰🇷 한글 설명

npm workspace 모드 또는 관련 플래그를 사용하여 npm pack 또는 npm publish를 실행할 때, 루트 레벨의 .gitignore 및 .npmignore 파일의 제외 지침을 무시하는 취약점입니다. 이로 인해 의도하지 않은 파일이 npm 레지스트리에 포함되어 배포될 위험이 있습니다.

💡 쉬운 설명

프로젝트에서 숨기고 싶은 파일들을 설정 파일에 적어두어도, 특정 모드에서는 이 설정이 무시되어 중요한 파일이 실수로 인터넷에 공개될 수 있습니다. 실수로 소스 코드나 비밀번호가 포함된 파일이 배포될 수 있는 위험한 상황입니다.

🇺🇸 원문 (English)

npm pack ignores root-level .gitignore and .npmignore file exclusion directives when run in a workspace or with a workspace flag (ie. `--workspaces`, `--workspace=<name>`). Anyone who has run `npm pack` or `npm publish` inside a workspace, as of v7.9.0 and v7.13.0 respectively, may be affected and have published files into the npm registry they did not intend to include. Users should upgrade to the latest, patched version of npm v8.11.0, run: npm i -g npm@latest . Node.js versions v16.15.1, v17.19.1, and v18.3.0 include the patched v8.11.0 version of npm.

📍 영향받는 시스템

npm v7.9.0 이상 (npm publish 관련) 및 v7.13.0 이상 (npm pack 관련)

⚔️ 공격 벡터

워크스페이스 환경에서 npm pack/publish 실행 시 설정 파일(.gitignore, .npmignore)을 무시하여 민감한 파일이 포함된 패키지 배포

🛡️ 대응 방법

npm을 최신 버전(v8.11.0 이상)으로 업데이트하거나, 패치된 Node.js 버전(v16.15.1, v17.19.1, v18.3.0 이상)으로 업그레이드하십시오.

🔧 검증 코드

출력된 npm 버전이 v8.11.0 미만인지 확인하여 취약 여부를 판단합니다.

Shell / Script
npm -v

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

💻 영향받는 소프트웨어

Node.js