RUSTSEC-2026-0317 A 512-byte workbook can provoke a multi-gigabyte allocation and abort the process
Attackers can cause denial of service by providing a small malicious file that triggers excessive memory allocation in the calamine library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is RUSTSEC-2026-0317?
RUSTSEC-2026-0317 is a denial of service vulnerability in sheets-diff, published on 29 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Which versions are affected by RUSTSEC-2026-0317?
1 open source package ship an affected version, including sheets-diff.
| Package | Affected | Fixed in |
|---|---|---|
sheets-diff crates.io | From 0.0.0-0 | 3.2.0 |
How do I fix RUSTSEC-2026-0317?
Upgrade sheets-diff to 3.2.0 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is RUSTSEC-2026-0317 being exploited?
There is no known exploitation of RUSTSEC-2026-0317 in the wild and no public exploit code.
Sources
Also known as GHSA-w5x2-6474-pqp4.