Skip to content

Update Rust crate zip to v9 [SECURITY] - #2956

Open
renovate[bot] wants to merge 2 commits into
mainfrom
renovate/crate-zip-vulnerability
Open

renovate[bot] wants to merge 2 commits into
mainfrom
renovate/crate-zip-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
zip dev-dependencies major 8.0.0 → 9.0.0
zip dependencies major 8.0.0 → 9.0.0

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

GHSA-vv5m-jxxh-4627 / RUSTSEC-2026-0367

More information

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: GHSA-vv5m-jxxh-4627

Severity

  • CVSS Score: 7.3 / 10 (High)
  • Vector String: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

References

This data is provided by OSV and the Rust Advisory Database (CC0 1.0).


zip: ZipArchive::extract creates symbolic links whose attacker-controlled targets are outside the destination directory

GHSA-4v9h-p7m9-rh26 / RUSTSEC-2026-0368

More information

Details

In zip 9.0.0-pre2, ZipArchive::extract creates a symbolic link from an archive entry after validating only the output entry path. The link target bytes are passed directly to the platform symlink API, so a malicious archive can create an entry inside the destination that resolves to an attacker-chosen path outside it. This behavior was verified on macOS and Linux. On either platform, a subsequent application read or write through that extracted entry accesses the external target with the extracting process's permissions.

For further details see: GHSA-4v9h-p7m9-rh26

Severity

Unknown

References

This data is provided by OSV and the Rust Advisory Database (CC0 1.0).


ZipStreamReader::extract() and ZipArchive::extract() apply Unix permissions through symlinks without confining the target

GHSA-4684-h2q9-2vcp / RUSTSEC-2026-0369

More information

Details

ZipStreamReader::extract() applies Unix permissions through extracted symlinks without validating the symlink target stays within the destination

For further details see: GHSA-4684-h2q9-2vcp

Severity

  • CVSS Score: 9.1 / 10 (Critical)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

References

This data is provided by OSV and the Rust Advisory Database (CC0 1.0).


Release Notes

zip-rs/zip2 (zip)

v9.0.0

Compare Source

🚀 Features
  • add ZipFileBuilder for parallelizing compression (#​911)
  • add method by_index_with_data_descriptor (#​994)
  • add len, is_empty and entry to ZipArchiveMetadata (#​1015)
  • read data descriptor from binary (#​990)
  • add comment and test for ZipStreamReader and symlinks (#​985)
  • (write) add ZipWriter::hide_file for in-place entry deletion (#​924)
  • add compression (#​948)
  • add test to in place modification (#​945)
  • move CustomExtraField to own file (#​941)
  • add a test on enum size (#​939)
  • use ZipFileEntry instead of ZipStreamFileMetadata (#​935)
  • add ZipFileEntry with no Reader (#​933)
  • change aes_mode to aes_settings() in ZipFileData (#​925)
  • cleanup and harmonize extra fields (#​923)
  • Rewrite zip64 extra (#​913)
🐛 Bug Fixes
  • reading an empty AES entry again at EOF returns Ok(0) (#​1024)
  • reject ZIP64 sizes that overflow u64 when computing data end offsets (#​1036)
  • apply central directory metadata in ZipStreamReader, only to written entries (#​1030)
  • consume the whole extended timestamp field in the central header (#​1016)
  • parse the central header of the extended timestamp (#​1002)
  • don't pre-allocate the declared size in the legacy decoders (#​991)
  • Symlink with very large declared size could lead to out-of-memory panic (#​984)
  • copy extra fields in raw_copy_file (#​955) (#​982)
  • add unix_mode when copy_raw_file (#​981)
  • rewrite documentation of add_symlink_from_path (#​979)
  • ignore a ZIP64 extra field that no sentinel asked for (#​962)
  • do not set data descriptor if directory (#​973)
  • expose flags function for easier access (#​972)
  • preserve unix permission in raw_copy_file (#​956)
  • clippy warning on nightly (#​960)
  • remove extra alloc used to copy (#​938)
  • lazy allocation on error case (#​937)
  • fix data alignment (#​929)
🚜 Refactor
  • move extract to own file (#​1009)
  • cleanup permissions related code (#​961)
  • remove feature gate (#​949)
  • create ZipFileFlags to wrap flags (#​947)
  • remove unused trait (#​946)
  • access crate::format with zip::unstable::format (#​944)
  • harmonize functions to format/functions.rs (#​943)
  • rewrite make_reader() function (#​936)
  • simplify initialize_local_block (#​934)
  • move write options to write/options.rs (#​931)
  • move spec to format (#​932)
  • move Magic to format (#​930)
  • [breaking] Remove ZipFileData::extra_data_start field that is never read (#​926)
⚙️ Miscellaneous Tasks
  • Fix high-level symlink extraction logic, disable some tests in miri, and fix some typos (#​1035)
Fix
  • some permissions tests can only run on Unix (#​1000)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@vercel

vercel Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nativelink Ready Ready Preview Oct 19, 2026 10:02am UTC
nativelink-aidm Ready Ready Preview Oct 19, 2026 10:02am UTC

Request Review

@renovate

renovate Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

This branch was successfully deployed

2 active deployments
Preview – nativelink — 0f59d556 Deployed Oct 19, 2026 by vercel[bot]
Preview – nativelink-aidm — 0f59d556 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant