RUSTSEC-2026-0546

Source
https://rustsec.org/advisories/RUSTSEC-2026-0546
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0546.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2026-0546
Aliases
Published
2026-10-22T12:00:00Z
Modified
2026-11-17T10:15:02Z
Severity
  • 7.4 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H CVSS Calculator
Summary
`ZipArchive::extract` can write outside the destination through absolute or chained symlink targets
Details

Before writing an entry whose path goes through a symlink, ZipArchive::extract checks the symlink's target against the destination directory. That check compares the paths as text and does not follow symlinks, and from 7.2.0 it drops the root and prefix of an absolute target before comparing. Symlinks taken from the archive were created without any check of their targets.

A crafted archive can first create a symlink that points outside the destination, then a second symlink whose target looks like a path inside the destination but goes through the first one, and then a file entry under the second symlink. The file is written outside the destination directory, for example over an existing file in the user's home directory, and extract still returns Ok(()). On Windows, a target on another drive or share whose path otherwise matches the destination passes the check directly (creating symlinks there needs Developer Mode or administrator rights). The attacker has to know or guess the absolute path of the destination directory.

This affects ZipArchive::extract and ZipArchive::extract_unwrapped_root_dir.

The fix resolves symlink targets one component at a time from the canonicalized destination, following symlinks on the way, and refuses to create a symlink, or write through one, that leads outside the destination.

Database specific
{
    "license":  "CC0-1.0"
}
References

Affected packages

crates.io / zip

Package

Affected ranges

Type
SEMVER
Events
Introduced
7.2.0
Fixed
9.0.0

Ecosystem specific

{
    "affected_functions":  null,
    "affects":  {
        "arch":  [],
        "functions":  [],
        "os":  []
    }
}

Database specific

categories
[
    "privilege-escalation"
]
cvss
"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H"
informational
null
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0546.json"