提出 #862473: ZJONSSON node-unzipper 0.12.3 Path Traversal情報

タイトルZJONSSON node-unzipper 0.12.3 Path Traversal
説明A path traversal / Zip Slip vulnerability exists in ZJONSSON/node-unzipper, npm package unzipper, version 0.12.3. The vulnerability is caused by unsafe extraction path validation. The affected code builds the destination path with path.join() and then checks whether the resulting path starts with the configured extraction directory using a raw string-prefix comparison: extractPath.indexOf(opts.path) != 0 This is not a proper directory-boundary check. If the intended extraction directory is named "out", a crafted ZIP entry such as "../out2/evil.txt" resolves to the sibling directory "out2". The resulting path still begins with the string prefix of the configured extraction path, so the check passes even though the file is outside the intended extraction directory. The issue affects at least the following extraction APIs: unzipper.Extract({ path }) Open.*.extract({ path }) The PoC creates a ZIP archive containing one file entry: ../out2/evil.txt The archive is extracted into: _local_prefix_poc/out Expected result: The entry should be rejected because it resolves outside the configured extraction root. Actual result: The file is written outside the extraction root into the sibling directory: _local_prefix_poc/out2/evil.txt Observed PoC output: escaped_exists=true inside_exists=false escaped_content=NODE_UNZIPPER_PREFIX_TRAVERSAL Successful exploitation allows an attacker to write files outside the intended ZIP extraction directory when a vulnerable application extracts attacker-controlled ZIP archives. Depending on the application deployment, this may allow writing to sibling directories, overwriting application-controlled files, placing attacker-controlled files in web-served directories, or potentially achieving code execution if the written file is later loaded or executed by the application. Suggested fix: The vulnerable string-prefix check should be replaced with canonical path resolution and directory-boundary validation using path.resolve() and path.relative(). The destination should only be accepted if it remains inside the configured extraction root. Estimated severity: High. Suggested CVSS v3.1 vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H, score 8.1. For more POC details, please see my issue: https://github.com/ZJONSSON/node-unzipper/issues/357
ソース⚠️ https://github.com/ZJONSSON/node-unzipper/issues/357
ユーザー
 zyhhoward (UID 97563)
送信2026年06月18日 05:41 (1 月 ago)
モデレーション2026年07月27日 09:18 (1 month later)
ステータス承諾済み
VulDBエントリ383384 [ZJONSSON node-unzipper 迄 0.12.3 lib/extract.js Extract ディレクトリトラバーサル]
ポイント20

Do you need the next level of professionalism?

Upgrade your account now!