-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Rust crate zip to v2.3.0 [SECURITY] #7806
Open
oxide-renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/crate-zip-vulnerability
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
c6af3b6
to
67ab53e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
=2.1.3
->=2.3.0
GitHub Vulnerability Alerts
CVE-2025-29787
Summary
In the archive extraction routine of affected versions of the
zip
crate, symbolic links earlier in the archive are allowed to be used for later files in the archive without validation of the final canonicalized path, allowing maliciously crafted archives to overwrite arbitrary files in the file system when extracted.Details
This is a variant of the zip-slip vulnerability, we can make the extraction logic step outside of the target directory by creating a symlink to the parent directory and then extracting further files through that symlink.
The documentation of the [
::zip::read::ZipArchive::extract
] method is in my opinion implying this should not happen:Most archive software either decline to extract symlinks that traverse out of the directory or defer creation of symlinks after all files have been created to prevent unexpected behavior when later entries depend on earlier symbolic link entries.
PoC
https://gist.github.com/eternal-flame-AD/bf71ef4f6828e741eb12ce7fd47b7b85
Impact
Users who extract untrusted archive files using the following high-level API method may be affected and critical files on the system may be overwritten with arbitrary file permissions, which can potentially lead to code execution.
Release Notes
zip-rs/zip2 (zip)
v2.3.0
Compare Source
🚀 Features
🐛 Bug Fixes
⚙️ Miscellaneous Tasks
v2.2.3
Compare Source
🚜 Refactor
DateTime
(#267)⚙️ Miscellaneous Tasks
v2.2.2
Compare Source
🐛 Bug Fixes
v2.2.1
Compare Source
🐛 Bug Fixes
⚡ Performance
v2.2.0
Compare Source
🚀 Features
ZipArchive::central_directory_start
(#232)v2.1.6
Compare Source
🐛 Bug Fixes
🚜 Refactor
v2.1.5
Compare Source
🚜 Refactor
v2.1.4
Compare Source
🐛 Bug Fixes
deep_copy_file
no longer allows overwriting an existing file, to match the behavior ofshallow_copy_file
merge_archive
,abort_file
anddeep_copy_file
. As well, we now return an error when a file is being copied to itself.Debug
forZipWriter
even when it's not implemented for the inner writer's typefinish_into_readable()
would corrupt the archive if the central directory had moved🚜 Refactor
⚡ Performance
validate_extra_data()
call⚙️ Miscellaneous Tasks
c934c82
ok_or_abort_file
, and inline when that fails borrow checkerok_or_abort_file
, and inline when that fails borrow checkerdebug_assert_eq!
Configuration
📅 Schedule: Branch creation - "" in timezone America/Los_Angeles, Automerge - "after 8pm,before 6am" in timezone America/Los_Angeles.
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.