update packages to zip v9 to address RUSTSEC-2026-{0367,0368,0369} #47

Open
opened 2026-10-21 20:51:08 +00:00 by decathorpe · 6 comments
Owner

Three RUSTSEC advisories have been published for the zip crate recently:

All three have only been addressed in zip >=9.0.0 and not in older versions. The advisories don't contain information which versions are affected, only that >=9.0.0 contains the necessary fixes. As such it's only safe to assume that all versions <9.0.0 are affected.

Affected applications (zip v8):

  • maturin (directly and via rust-python-pkginfo) – upstream claims no impact
  • python-uv-build (via rust-astral_async_zip) – zip is only a test dep. for astral_async_zip; python-uv-build is not built with zip
  • ruff
  • ty
  • uutils-coreutils
  • uv (via rust-astral_async_zip) – zip is only a test dep. for astral_async_zip; uv is not built with zip

(All of the above have been updated to zip v9.)

Affected applications (zip v2):

  • selenium-manager

(The above has been updated to zip v9.)

Affected applications (zip v0.6):

  • keylime-agent-rust
  • nushell (via rust-calamine)
  • rust-add-determinism
  • rust-coreutils (Fedora <45)
  • rust-nu (Fedora <45, via rust-calamine)
  • rust-sccache

Bundled dependencies:

  • cosmic-edit: v8.6.0
  • cosmic-files: v8.6.0
  • cosmic-initial-setup: v8.6.0
  • cosmic-settings-daemon: v8.6.0
  • cosmic-term v8.6.0
  • goose: v0.6.6 and v8.6.0
  • trunk: v2.6.1
  • xdg-desktop-portal-cosmic: v8.6.0
Three RUSTSEC advisories have been published for the `zip` crate recently: - <https://rustsec.org/advisories/RUSTSEC-2026-0367.html> (CVSS 7.3 HIGH) - <https://rustsec.org/advisories/RUSTSEC-2026-0368.html> - <https://rustsec.org/advisories/RUSTSEC-2026-0369.html> (CVSS 9.1 CRITITCAL) All three have only been addressed in zip `>=9.0.0` and not in older versions. The advisories don't contain information which versions are *affected*, only that `>=9.0.0` contains the necessary fixes. As such it's only safe to assume that all versions `<9.0.0` are affected. **Affected applications** (zip v8): - [x] maturin (directly and via rust-python-pkginfo) – **[upstream claims no impact](https://github.com/PyO3/maturin/pull/3334)** - [x] python-uv-build (via rust-astral_async_zip) – **`zip` is only a test dep. for `astral_async_zip`; `python-uv-build` is not built with `zip`** - [x] ruff - [x] ty - [x] uutils-coreutils - [x] uv (via rust-astral_async_zip) – **`zip` is only a test dep. for `astral_async_zip`; `uv` is not built with `zip`** (All of the above have been updated to `zip` v9.) **Affected applications** (zip v2): - [x] selenium-manager (The above has been updated to `zip` v9.) **Affected applications** (zip v0.6): - [ ] keylime-agent-rust - [ ] nushell (via rust-calamine) - [ ] rust-add-determinism - [ ] rust-coreutils (Fedora <45) - [ ] rust-nu (Fedora <45, via rust-calamine) - [ ] rust-sccache **Bundled dependencies**: - [ ] cosmic-edit: v8.6.0 - [ ] cosmic-files: v8.6.0 - [ ] cosmic-initial-setup: v8.6.0 - [ ] cosmic-settings-daemon: v8.6.0 - [ ] cosmic-term v8.6.0 - [ ] goose: v0.6.6 and v8.6.0 - [ ] trunk: v2.6.1 - [ ] xdg-desktop-portal-cosmic: v8.6.0
Member

This is probably going to come after the rustls and webpki updates have settled out, just for practical and capacity reasons. Updating packages that already use v8 should be easy, and I would prefer to coordinate all of these simultaneously and avoid a v8 compat package.

Neither uv nor python-uv-build is actually affected, because zip is just a test dependency for astral_async_zip.

This is probably going to come after the rustls and webpki updates have settled out, just for practical and capacity reasons. Updating packages that already use v8 should be easy, and I would prefer to coordinate all of these simultaneously and avoid a v8 compat package. Neither `uv` nor `python-uv-build` is actually affected, because `zip` is just a test dependency for `astral_async_zip`.
Member

Looking at https://github.com/PyO3/maturin/pull/3334, this update is going to be a bit fussier than I anticipated. Maturin upstream claims to have analyzed their direct and indirect uses and not to be affected.

# zip >=9 fixes these. python-pkginfo 0.6.8 requires zip <9 and xwin 0.10.0
# requires zip ^8, so 8.5.1 stays until those crates allow zip 9.
# The advisories are in ZipArchive::extract / ZipStreamReader::extract.
# maturin writes wheels and reads entries by name, python-pkginfo reads
# metadata with ZipArchive::by_name, and xwin copies VSIX members with
# ZipArchive::by_index. None of them call the affected extract APIs.
{ id = "RUSTSEC-2026-0367", reason = "zip >=9 is unreachable: python-pkginfo 0.6.8 caps zip at <9 and xwin 0.10.0 requires ^8. Callers write archives or read entries by name/index; they do not call ZipArchive::extract or ZipStreamReader::extract" },
{ id = "RUSTSEC-2026-0368", reason = "zip >=9 is unreachable: python-pkginfo 0.6.8 caps zip at <9 and xwin 0.10.0 requires ^8. Callers write archives or read entries by name/index; they do not call ZipArchive::extract or ZipStreamReader::extract" },
{ id = "RUSTSEC-2026-0369", reason = "zip >=9 is unreachable: python-pkginfo 0.6.8 caps zip at <9 and xwin 0.10.0 requires ^8. Callers write archives or read entries by name/index; they do not call ZipArchive::extract or ZipStreamReader::extract" },

I tried to help unblock maturin upstream by offering a patch for https://github.com/Jake-Shadle/xwin (a Windows-only dependency that we don’t need in Fedora), but I encountered nontrivial API changes around archive member names. For example, ZipFile::name() returned &str in v8, and in v9 it returns ZipResult<Cow<'_, str>>.

(Despite the exhaustive enumeration of tiny, low-level changes in https://github.com/zip-rs/zip2/blob/v9.1.2/CHANGELOG.md, and the indication of several of them as [BREAKING], zip upstream doesn’t seem to have mentioned this change at all. Nor do they offer a high-level overview of significant changes or a migration guide when issuing a new major release. No wonder the ecosystem is all over the place with old zip versions.)

I’ll take a look at the packages that we actually have in Fedora as I have a chance, but it feels like this is likely to be a rust-zip8 compat package and wait for upstreams stituation.

Looking at https://github.com/PyO3/maturin/pull/3334, this update is going to be a bit fussier than I anticipated. Maturin upstream claims to have analyzed their direct and indirect uses and not to be affected. > # zip >=9 fixes these. python-pkginfo 0.6.8 requires zip <9 and xwin 0.10.0 > # requires zip ^8, so 8.5.1 stays until those crates allow zip 9. > # The advisories are in ZipArchive::extract / ZipStreamReader::extract. > # maturin writes wheels and reads entries by name, python-pkginfo reads > # metadata with ZipArchive::by_name, and xwin copies VSIX members with > # ZipArchive::by_index. None of them call the affected extract APIs. > { id = "RUSTSEC-2026-0367", reason = "zip >=9 is unreachable: python-pkginfo 0.6.8 caps zip at <9 and xwin 0.10.0 requires ^8. Callers write archives or read entries by name/index; they do not call ZipArchive::extract or ZipStreamReader::extract" }, > { id = "RUSTSEC-2026-0368", reason = "zip >=9 is unreachable: python-pkginfo 0.6.8 caps zip at <9 and xwin 0.10.0 requires ^8. Callers write archives or read entries by name/index; they do not call ZipArchive::extract or ZipStreamReader::extract" }, > { id = "RUSTSEC-2026-0369", reason = "zip >=9 is unreachable: python-pkginfo 0.6.8 caps zip at <9 and xwin 0.10.0 requires ^8. Callers write archives or read entries by name/index; they do not call ZipArchive::extract or ZipStreamReader::extract" }, I tried to help unblock maturin upstream by offering a patch for https://github.com/Jake-Shadle/xwin (a Windows-only dependency that we don’t need in Fedora), but I encountered nontrivial API changes around archive member names. For example, `ZipFile::name()` returned `&str` in v8, and in v9 it returns `ZipResult<Cow<'_, str>>`. (Despite the exhaustive enumeration of tiny, low-level changes in https://github.com/zip-rs/zip2/blob/v9.1.2/CHANGELOG.md, and the indication of several of them as **[BREAKING]**, `zip` upstream doesn’t seem to have mentioned this change at all. Nor do they offer a high-level overview of significant changes or a migration guide when issuing a new major release. No wonder the ecosystem is all over the place with old `zip` versions.) I’ll take a look at the packages that we actually have in Fedora as I have a chance, but it feels like this is likely to be a `rust-zip8` compat package and wait for upstreams stituation.
Member

I confirmed that rust-python-pkginfo would also need some non-obvious changes to deal with fallible filename accesses. Glancing at the zip source, this seems most likely to happen due to the filename bytes not conforming to an expected string encoding. Deciding how to deal with this in a way consistent with a library or application’s goals and existing error handling strategy is not an easy thing to do without some upstream design work.

I confirmed that `rust-python-pkginfo` would also need some non-obvious changes to deal with fallible filename accesses. Glancing at the [`zip` source](https://github.com/zip-rs/zip2/blob/e656c5dbcfeb73e82e29ace2c1a71705fe13eeec/src/types.rs#L127-L137), this seems most likely to happen due to the filename bytes not conforming to an expected string encoding. Deciding how to deal with this in a way consistent with a library or application’s goals and existing error handling strategy is not an easy thing to do without some upstream design work.
Member

This will need updates for the zstd and constant_time_eq crates, presumably also with compat packages.

This will need updates for the `zstd` and `constant_time_eq` crates, presumably also with compat packages.
Member

@decathorpe Would you be available (at some point) to handle the zstd/zstd-safe/zstd-sys updates needed for this? I’m sure I could work through them given enough time, but they’re pretty messy packages to work on. I think we’ll need compat packages for zstd and zstd-safe, but I would love to be wrong. I haven’t proven that we can’t patch this to work with the previous zstd, but given the amount of code churn in the same commits as github.com/zip-rs/zip2@700bf5d61d and github.com/zip-rs/zip2@b5326b2b42, I would be shocked if that were possible.

@decathorpe Would you be available (at some point) to handle the `zstd`/`zstd-safe`/`zstd-sys` updates needed for this? I’m sure I could work through them given enough time, but they’re pretty messy packages to work on. I think we’ll need compat packages for `zstd` and `zstd-safe`, but I would love to be wrong. I haven’t *proven* that we can’t patch this to work with the previous `zstd`, but given the amount of code churn in the same commits as https://github.com/zip-rs/zip2/commit/700bf5d61d5efeff0e5f701c446b882913330798 and https://github.com/zip-rs/zip2/commit/b5326b2b42a19f6b5e861e3c726ac58eead521c7, I would be shocked if that were possible.
Author
Owner

Yes, I had planned to work on the zstd crate updates soon(-ish). I agree that compat packages for zstd-safe and zstd will likely be necessary, if hopefully only for some limited time.

Yes, I had planned to work on the zstd crate updates soon(-ish). I agree that compat packages for zstd-safe and zstd will likely be necessary, if hopefully only for some limited time.
Sign in to join this conversation.
No description provided.