🔍 CVE-2026-23950

8.8
CVSS Score
HIGH
2026-01-20
2026-08-24 13:17
✅ 완료

🇰🇷 한글 설명

Node.js에서 사용되는 tar 라이브러리인 node-tar에 버전 7.5.3까지의 버전에서 유니코드 경로 충돌을 제대로 처리하지 않아 발생하는 레이스 컨디션 취약점이 있습니다. 이 취약점은 macOS의 APFS 파일 시스템에서 테스트되었으며, 라이브러리가 내부적으로 경로 예약 시스템을 사용하여 메타데이터 확인과 파일操作을 직렬화하지만, 유니코드 정규화에 민감하지 않은 파일 시스템에서 충돌하는 경로를 제대로 잠글 수 없게 됩니다. 이로 인해 심볼릭 링크 중독 공격을 허용하여 임의의 파일을 덮어쓸 수 있습니다.

💡 쉬운 설명

Node.js의 tar 라이브러리인 node-tar에 버전 7.5.3까지의 버전에서 취약점이 있습니다. 이 취약점은 macOS에서 발생하며, 공격자가 임의의 파일을 덮어쓸 수 있습니다. 라이브러리의 내부 동작과 파일 시스템의 유니코드 처리 방법이 맞지 않아 발생합니다.

🇺🇸 원문 (English)

node-tar,a Tar for Node.js, has a race condition vulnerability in versions up to and including 7.5.3. This is due to an incomplete handling of Unicode path collisions in the `path-reservations` system. On case-insensitive or normalization-insensitive filesystems (such as macOS APFS, In which it has been tested), the library fails to lock colliding paths (e.g., `ß` and `ss`), allowing them to be processed in parallel. This bypasses the library's internal concurrency safeguards and permits Symlink Poisoning attacks via race conditions. The library uses a `PathReservations` system to ensure that metadata checks and file operations for the same path are serialized. This prevents race conditions where one entry might clobber another concurrently. This is a Race Condition which enables Arbitrary File Overwrite. This vulnerability affects users and systems using node-tar on macOS (APFS/HFS+). Because of using `NFD` Unicode normalization (in which `ß` and `ss` are different), conflicting paths do not have their order properly preserved under filesystems that ignore Unicode normalization (e.g., APFS (in which `ß` causes an inode collision with `ss`)). This enables an attacker to circumvent internal parallelization locks (`PathReservations`) using conflicting filenames within a malicious tar archive. The patch in version 7.5.4 updates `path-reservations.js` to use a normalization form that matches the target filesystem's behavior (e.g., `NFKD`), followed by first `toLocaleLowerCase('en')` and then `toLocaleUpperCase('en')`. As a workaround, users who cannot upgrade promptly, and who are programmatically using `node-tar` to extract arbitrary tarball data should filter out all `SymbolicLink` entries (as npm does) to defend against arbitrary file writes via this file system entry name collision issue.

📍 영향받는 시스템

macOS에서 node-tar 버전 7.5.3 이하를 사용하는 시스템

⚔️ 공격 벡터

공격자가 악의적인 tar 아카이브를 생성하여 시스템에 업로드할 경우, 라이브러리의 취약점을 이용하여 임의의 파일을 덮어쓸 수 있습니다.

🛡️ 대응 방법

node-tar를 버전 7.5.4 이상으로 업그레이드하거나, 임의의 tarball 데이터를 추출할 때 심볼릭 링크 항목을 필터링하여 임의의 파일 쓰기 공격을 방어할 수 있습니다.

🔧 검증 코드

로컬 시스템에서 npm을 사용하여 node-tar의 버전을 확인합니다. 코드를 실행하기 위해서는 Python과 npm이 설치되어 있어야 합니다. 코드 실행 결과는 JSON 형식으로 출력되며, node-tar의 버전이 7.5.3 이하이면 취약, 7.5.4 이상이면 양호로 판단합니다.

Shell / Script
import subprocess
result = subprocess.run(['npm', 'ls', 'node-tar'], capture_output=True, text=True)
if 'node-tar@' in result.stdout and result.stdout.split('node-tar@')[1].split('<')[0] <= '7.5.3':
    print("{\"result\": \"취약\", \"reason\": \"node-tar 버전이 7.5.3 이하입니다.\"}")
else:
    print("{\"result\": \"양호\", \"reason\": \"node-tar 버전이 7.5.4 이상입니다.\"}")

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Node.js