Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

RUSTSEC-2026-0436

UNSCORED

Panic and unbounded allocation (OOM) in the CFB/OLE2 parser on malformed input

Mitigation

  • Upgrade calamine to 0.38.0 or later.

Who should check

  • Projects that depend on crates.io package calamine (>= 0.0.0-0, < 0.38.0)

Vulnerability facts

Affected
calamine >= 0.0.0-0, < 0.38.0
Fixed in
0.38.0
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Unknown
CVSS
Not scored yet
Published
Modified

Description

The Compound File Binary (OLE2) parser (`src/cfb.rs`), used when reading `.xls` and `.xlsb` workbooks and when extracting VBA projects from `.xlsx`, can panic or allocate without bound on crafted input. Both are reachable through the public reader API (`open_workbook`, `Xls::new`, `Xlsb::new`) on an attacker-supplied file. Impact is denial of service only — no memory unsafety (safe Rust turns the out-of-bounds read into a bounds-checked panic). 1. **Reachable panic (out-of-bounds slice index).** The directory stream is iterated with `.chunks(128)`, but `Directory::from_slice` reads fixed offsets (`buf[..64]`, `buf[116..120]`, `buf[120..128]`) without checking the chunk length. A directory stream whose length is not a multiple of 128 yields a short final chunk, causing a panic (`range end index 64 out of range for slice of length N`). `SectorSize::Small` 64-byte mini sectors are a second trigger. 2. **Unbounded allocation / OOM.** The DIFAT loader grows the `difat` vector without bounding the number of iterations; a crafted self-referential DIFAT chain drives a multi-gigabyte allocation from a tiny file (a 512-byte file attempts an allocation of several gigabytes). A consumer that parses untrusted or user-supplied spreadsheets can be crashed (thread panic, or process abort under `panic=abort`) or driven out of memory by a small crafted file. Fixed in calamine 0.38.0 (commit [b8ec4f0](https://github.com/tafia/calamine/commit/b8ec4f0)); the maintainer confirmed the fix in https://github.com/tafia/calamine/pull/762.

Affected and fixed versions

Package / productAffectedFixedSource
crates.io calamine>= 0.0.0-0, < 0.38.00.38.0osv

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by RUSTSEC-2026-0436. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/RUSTSEC-2026-0436.md
Affected: calamine >= 0.0.0-0, < 0.38.0
Fixed in: 0.38.0

Steps:
1. Search this machine and project for calamine (crates.io): dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is RUSTSEC-2026-0436 being exploited?

There is no confirmed exploitation: RUSTSEC-2026-0436 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

How serious is RUSTSEC-2026-0436?

It has no CVSS score yet. Unknown.

Which versions are affected by RUSTSEC-2026-0436?

calamine >= 0.0.0-0, < 0.38.0.

Is there a fix for RUSTSEC-2026-0436?

Yes. Fixed in 0.38.0. Upgrade calamine to 0.38.0 or later.

How do I check if I'm affected by RUSTSEC-2026-0436?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors