Email me

Rust advisories / sheets-diff

Vulnerability MediumRUSTSEC-2026-0317 · sheets-diff

RUSTSEC-2026-0317: A 512-byte workbook can provoke a multi-gigabyte allocation and abort the process

Short answerA security vulnerability in the sheets-diff crate: A 512-byte workbook can provoke a multi-gigabyte allocation and abort the process. Medium severity (CVSS 5.5). Fixed in 3.2.0: update to a fixed version.

Cratesheets-diff
TypeVulnerability (denial-of-service)
Affected versionsBefore 3.2.0.
Fixed in3.2.0
SeverityMedium, CVSS 5.5
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Published2026-09-29
Last changed2026-10-01
Also known asGHSA-w5x2-6474-pqp4

What to do

  1. See which version you have: cargo tree -i sheets-diff (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p sheets-diff. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example sheets-diff = "3.2.0") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

Affected versions passed caller-supplied bytes to calamine's Xlsx::new without first checking that they were a ZIP archive. Xlsx::new tests for password protection on its first line, which parses the input as an OLE/CFB container, and a sector-count field read from the file's own header reaches Vec::with_capacity without being checked against the file's actual length. A 512-byte input can therefore request several gigabytes; 9,261,285,372 bytes was measured.

**The oversized allocation is always attempted. Whether it aborts depends on what the allocator can satisfy.** On a large host with overcommit the reservation is granted untouched and the call returns an ordinary "not an xlsx file" error, which looks like a malformed file being correctly rejected. Under a memory limit the same bytes give memory allocation of N bytes failed and the process aborts, which is not a Result a caller can handle. Containers with a memory limit, small hosts and CI runners are where this lands, so testing on a development machine can wrongly suggest the crate is unaffected.

Every entry point reaches it, not only compare_bytes: the path- and reader-based APIs funnel through the same internal open. Neither Limits::default() nor Limits::hardened() prevents it, because max_input_bytes bounds the length of the input while the allocation's size comes from a field inside it.

Fixed in 3.2.0, which declines input that does not begin with the ZIP magic before the parser sees it, removing the path rather than bounding it. Callers who cannot upgrade can apply the same check before calling this crate.

The underlying defect is in calamine, reported there independently as tafia/calamine#714 and unfixed at the time of writing. It is reachable from any crate that opens untrusted bytes with Xlsx::new.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Up next

Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ