🇰🇷 한글 설명
Node.js 20의 fs.openAsBlob() API가 --allow-fs-read 플래그를 사용한 파일 시스템 읽기 제한을 우회할 수 있는 취약점입니다. 해당 API에 필요한 permission 검증 로직이 누락되어 있어 권한이 없는 파일에 접근 가능합니다.
💡 쉬운 설명
Node.js가 파일 접근을 제한하는 보안 기능이 특정 함수를 통해 무시될 수 있습니다. 프로그래머가 차단한 파일을 특정 API로 읽을 수 있게 됩니다.
🇺🇸 원문 (English)
fs.openAsBlob() can bypass the experimental permission model when using the file system read restriction with the `--allow-fs-read` flag in Node.js 20. This flaw arises from a missing check in the `fs.openAsBlob()` API.
Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.
📍 영향받는 시스템
Node.js 20.x (permission model 활성화 시)
⚔️ 공격 벡터
fs.openAsBlob() 함수를 직접 호출하여 --allow-fs-read 제한을 우회하고 권한이 없는 파일 접근
🛡️ 대응 방법
Node.js를 최신 보안 패치 버전으로 업그레이드 (20.12.0 이상)
🔧 검증 코드
Node.js 버전이 20.x이고 패치 레벨이 낮으면 취약함, v20.12.0 이상이면 안전
node -v | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' && node -e "console.log(require('fs').openAsBlob ? 'vulnerable function exists' : 'safe')"