Skip to content

deps: zip 9.5.1, calamine 0.38.0, rustls 0.23.46 (Dependabot #2-#10) - #86

Merged
blockmandev merged 1 commit into
mainfrom
fix/dependabot-zip-rustls
Nov 13, 2026
Merged

blockmandev merged 1 commit into
mainfrom
fix/dependabot-zip-rustls

Conversation

@blockmandev

Copy link
Copy Markdown
Member

Fixes the 9 open Dependabot alerts.

crate from → to where alerts
zip 8.6.0 → 9.5.1 (MIT, MSRV 1.88) shipped: docx/pptx/odt reading, ext_tools archive unpacking #6 critical (dual-header parser differential → overwrite/RCE), #7 high (extract writes outside via symlink), #8 high, #9 high (DoS), #10 medium (AES HMAC)
calamine 0.36.1 → 0.38.0 (MIT, MSRV 1.88) spreadsheet reading first version on zip 9 (0.36.1 required zip ^8.6), so only one zip remains in the tree
rustls 0.23.45 → 0.23.46 dev-dependency (tests only) #2–#5 (low/medium)

Toolchain is 1.97, so the 1.88 MSRV is fine. Version pins and reasons are recorded in Cargo.toml.

Code changes (zip 9 API)

  • ZipFile::name() and file_names() return Result. ext_tools/unpack.rs refuses an entry whose name can't be read. tools/documents.rs skips such a name, because it only looks up known parts.
  • Learned along the way: zip 9 does not reject invalid UTF-8 in a flagged name. It decodes it as CP437, producing a harmless name inside the target folder.

Tests (Windows, local)

  • fmt and clippy -D warnings (workspace) clean.
  • cargo test --lib --bins: 2435 passed and 1 failed. The failure is acp_agent::flow_tests::session_new_answers_before_a_slow_server_has_listed_its_tools, a timing test that doesn't involve zip or calamine. Rerun alone it passed 3/3 (4.5 s each), so it fails under full-suite load.
  • Archive unpacking: 17 ext_tools tests (zip-slip, links, bounds, plain unpack, install end to end) plus a new one. The new test builds an archive whose local header names ../e.txt while its central directory says fine.txt, the critical advisory's shape, and checks that nothing is written outside the folder; a consistent archive is the control. It guards against regressions. It was not run against 8.6.0.
  • Spreadsheets and documents: 21 tools::documents tests (workbooks to tables, long sheets, docx, the zip-bomb budget).

…#10)

zip 8.6.0 (shipped: documents and the tool archives ext_tools unpacks) had
advisories fixed in 9.0.5: a parser differential between its two headers
(critical), extract() writing outside the target through a symlink, unbounded
symlink targets and Shrink/Reduce/Implode sizes (high), an AES HMAC check
skipped at early EOF (medium). calamine 0.38.0 is the first on zip 9 (0.36.1
needed zip ^8.6), so the spreadsheet reader leaves zip 8 too: one zip in the
tree. rustls 0.23.45 -> 0.23.46 is a test-only dev-dependency (4 low/medium
alerts). All MIT or MIT/Apache/ISC; MSRV 1.88 (toolchain 1.97).

zip 9 returns an entry's name as a Result. ext_tools refuses an entry whose
name it cannot read; the document reader skips one (it looks for known
parts only).

New test: a zip whose local header names `../e.txt` while the central
directory names `fine.txt` (the critical advisory's shape) writes nothing
outside the folder; control: the consistent archive unpacks. It guards a
regression; it was not run against zip 8.6.0.
@blockmandev
blockmandev merged commit 0f02fe6 into main Nov 13, 2026
12 checks passed
@blockmandev
blockmandev deleted the fix/dependabot-zip-rustls branch November 15, 2026 20:29
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