🇰🇷 한글 설명
Node.js의 crypto 모듈에서 crypto.randomUUID(), crypto.randomUUIDv7(), crypto.randomInt()가 사용하는 내부 엔트로피 캐시가 사용자 영역 시작 스냅샷(--build-snapshot) 및 useSnapshot으로 빌드된 단일 실행 파일 애플리케이션에 저장되는 결함입니다. 스냅샷 빌드 중 해당 함수 또는 URL.createObjectURL() 같은 이에 의존하는 API가 호출되면, 캐시가 다시 채워질 때까지 해당 스냅샷에서 시작된 모든 프로세스가 동일한 값을 반환합니다. 이로 인해 고유해야 할 식별자가 프로세스 간에 충돌하고, 한 프로세스가 발급한 값을 다른 프로세스를 관찰하여 예측할 수 있습니다.
💡 쉬운 설명
Node.js로 만든 프로그램을 스냅샷 방식으로 배포할 때, 고유해야 할 난수 값이 여러 실행 인스턴스에서 똑같이 생성될 수 있습니다. 이 때문에 고유 ID가 겹치거나 난수가 예측될 위험이 있습니다.
🇺🇸 원문 (English)
A flaw in Node.js `crypto` causes the internal entropy caches used by `crypto.randomUUID()`, `crypto.randomUUIDv7()`, and `crypto.randomInt()` to be saved into user-land startup snapshots (`--build-snapshot`) and single executable applications built with `useSnapshot`.
If any of these functions, or an API that relies on them such as `URL.createObjectURL()`, is called while the snapshot is built, every process started from that snapshot returns the same values until the cache is refilled: up to 127 UUIDs and about 1,000 `randomInt()` values. Identifiers expected to be unique can collide across processes, and values issued by one process can be predicted by observing another.
This vulnerability affects Node.js **26.x**, **24.x**, and **22.x**.
📍 영향받는 시스템
Node.js 26.x, 24.x, 22.x 중 --build-snapshot 또는 useSnapshot을 사용하는 환경
⚔️ 공격 벡터
공격자가 한 프로세스의 출력값을 관찰해 같은 스냅샷에서 시작된 다른 프로세스의 난수/UUID를 예측하거나, 중복된 식별자를 악용
🛡️ 대응 방법
패치된 Node.js 버전으로 업그레이드하고, 스냅샷 빌드 중 crypto 난수 함수 호출을 피하며, 스냅샷 재빌드 및 재배포
🔧 검증 코드
출력된 버전이 패치가 적용된 Node.js 26.x, 24.x, 22.x의 최신 보안 릴리스인지 Node.js 공식 보안 공지와 대조하여 확인하고, 미패치 버전이면 업그레이드가 필요합니다.