{"id":"RUSTSEC-2026-0503","aliases":["RUSTSEC-2026-0503"],"related":[],"kind":"vulnerability","state":"published","title":"eazip: symlink-target validation checks the wrong argument, allowing extraction path escapes on Windows","summary":"When extracting archives, `eazip` validates symlink entries before writing\nthem. The validation function `validate_symlink()` (`src/utils/mod.rs`) scans\nfor backslash and NUL bytes, but passes the symlink's *name* where the\nsymlink's *target* was intended:\n\n```rust\nmemchr2(b'\\\\', b'\\0', name.as_bytes()) // should be target.as_bytes()\n```\n\nAs a result, symlink *targets* containing backslash or NUL bytes pass\nvalidation. On Windows, backslash is a path separator, so targets such as\n`..\\..\\..\\Windows\\system32\\evil.exe` also defeat the remaining depth check,\nwhich splits on `/` only. A crafted archive can therefore create symlinks\nthat resolve outside the extraction directory — including UNC targets such as\n`\\\\host\\share\\...` — redirecting writes to arbitrary filesystem locations\nchosen by the attacker.\n\nApplications that extract untrusted archives with `eazip` on Windows targets\nare affected; on Unix targets backslash is not a separator, which limits\nexposure there.\n\nThe vulnerability was introduced in version 0.2.5 and fixed in 0.2.7\n([a1phyr/eazip@0e4caa13](https://github.com/a1phyr/eazip/commit/0e4caa13d59f5ba15aaac332f5534260c3b8fc43)),\nwhich rejects backslash and NUL bytes in the symlink target. It was\nprivately reported to the maintainer on 2026-11-06 and credited in the\n0.2.7 release notes.","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"When extracting archives, `eazip` validates symlink entries before writing\nthem. The validation function `validate_symlink()` (`src/utils/mod.rs`) scans\nfor backslash and NUL bytes, but passes the symlink's *name* where the\nsymlink's *target* was intended:\n\n```rust\nmemchr2(b'\\\\', b'\\0', name.as_bytes()) // should be target.as_bytes()\n```\n\nAs a result, symlink *targets* containing backslash or NUL bytes pass\nvalidation. On Windows, backslash is a path separator, so targets such as\n`..\\..\\..\\Windows\\system32\\evil.exe` also defeat the remaining depth check,\nwhich splits on `/` only. A crafted archive can therefore create symlinks\nthat resolve outside the extraction directory — including UNC targets such as\n`\\\\host\\share\\...` — redirecting writes to arbitrary filesystem locations\nchosen by the attacker.\n\nApplications that extract untrusted archives with `eazip` on Windows targets\nare affected; on Unix targets backslash is not a separator, which limits\nexposure there.\n\nThe vulnerability was introduced in version 0.2.5 and fixed in 0.2.7\n([a1phyr/eazip@0e4caa13](https://github.com/a1phyr/eazip/commit/0e4caa13d59f5ba15aaac332f5534260c3b8fc43)),\nwhich rejects backslash and NUL bytes in the symlink target. It was\nprivately reported to the maintainer on 2026-11-06 and credited in the\n0.2.7 release notes.","format":"markdown","source":"rustsec"}],"published":"2026-11-07T12:00:00.000Z","modified":"2026-11-12T08:00:03.177Z","severity":{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N","score":8.6,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.2.5","status":"affected","fixed":"0.2.7"}],"ecosystem":"crates.io","package":"eazip","purl":"pkg:cargo/eazip","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/eazip","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0503.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/a1phyr/eazip/releases/tag/v0.2.7","tags":["web"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0503","url":"https://rustsec.org/advisories/RUSTSEC-2026-0503.html","licence":"CC0-1.0","modified":"2026-11-12T08:00:03.177Z"}],"updatedAt":"2026-11-25T22:56:43.491Z"}