zip2に展開先の外へファイルを書き込まれる脆弱性
Summary
zip2の7.2.0から9.0.0より前では、ZIPを展開する際に、シンボリックリンク先の検証が文字列の前方一致で行われるため、展開先の外にファイルを作成・上書きされるおそれがあります。CVSSは7.4です。修正版の9.0.0に更新してください。
AI summary
Written by an external AI model and may contain mistakes. Check the original description and references below before acting on it.
zip2の7.2.0から9.0.0より前では、ZIPを展開する際に、シンボリックリンク先の検証が文字列の前方一致で行われるため、展開先の外にファイルを作成・上書きされるおそれがあります。CVSSは7.4です。修正版の9.0.0に更新してください。
Affected packages
| Ecosystem | Package | Affected | Fixed |
|---|---|---|---|
| zip-rs | zip2 | — | — |
Original description The description as published by the source.
zip is a zip library for Rust that supports reading and writing simple ZIP files. From 7.2.0 until 9.0.0, ZipArchive::extract and ZipArchive::extract_unwrapped_root_dir use safe_prepare_path in src/read/zipfile.rs and simplified_components in src/path.rs to validate symbolic link targets with a lexical prefix comparison rather than resolving each intermediate link. An attacker who knows or can guess the absolute extraction destination can create a chain whose apparent target remains under the destination while an intermediate symlink resolves outside it, allowing attacker-controlled files to be created or overwritten with the extracting process's privileges. On Windows, discarded drive and UNC prefixes can permit a single-link escape when the process has SeCreateSymbolicLinkPrivilege, such as through administrator rights or Developer Mode. This regression is distinct from CVE-2025-29787. This issue is fixed in version 9.0.0.
Source: CVE.org (CVE Program・cvelistV5) NVD