Advisory

RUSTSEC-2026-0367

Also known as: GHSA-vv5m-jxxh-4627

Summary

Insecure Preservation of SUID/SGID Bits during ZIP Extraction Leading to Potential Privilege Escalation

Details

The zip crate preserves privileged Unix permission bits (SUID, SGID, and sticky bits) from ZIP external_attributes during extraction, instead of masking them to safe permission bits. If a privileged process (for example, root in an installer, CI/CD pipeline, or container build) extracts an attacker-controlled ZIP archive using ZipArchive::extract() or the stream extraction API, files can be created as setuid-root or setgid. This behavior allows the creation of SUID/SGID files during extraction, which can lead to local privilege escalation depending on the execution environment.

For further details see: https://github.com/zip-rs/zip2/security/advisories/GHSA-vv5m-jxxh-4627

Severity

High Basis: CVSS v3 score 7.3, vector CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Dates

Published
2026-10-09 12:00 UTC
Modified
2026-10-16 23:30 UTC

Affected packages and fixes

zip

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 9.0.0 (semver)

Fixed versions

9.0.0

Fix

  • Fixed version 9.0.0
    cargo update -p zip --precise 9.0.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences