RUSTSEC-2026-0410
WebAssembly allocator shim corrupts memory on allocation failure
Mitigation
- Upgrade zstd-sys to 2.1.2 or later.
Who should check
- Projects that depend on crates.io package zstd-sys (>= 2.0.9, < 2.1.2)
Vulnerability facts
- Affected
- zstd-sys >= 2.0.9, < 2.1.2
- Fixed in
- 2.1.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Unknown
- CVSS
- Not scored yet
- Modified
Description
On wasm32, zstd-sys provides `malloc` and `free` to the C library through a shim over Rust's allocator. The shim did not check for allocation failure: it wrote its size header to address 0 and returned address 4, which the C library used as a valid buffer. `free(NULL)` also read below address 0. Whenever the instance cannot grow its memory by what a frame asks for, a small crafted frame (a 9-byte header declaring a 128 MiB window is enough) made decompression write decoded data over the bottom of the module's linear memory, instead of failing. The corruption stays within the wasm sandbox. The flaw was corrected by returning NULL on allocation failure or size overflow, and by making `free(NULL)` a no-op.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| crates.io zstd-sys | >= 2.0.9, < 2.1.2 | 2.1.2 | osv |
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-0410. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/RUSTSEC-2026-0410.md Affected: zstd-sys >= 2.0.9, < 2.1.2 Fixed in: 2.1.2 Steps: 1. Search this machine and project for zstd-sys (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
Vendor advisories
Patches
FAQ
Is RUSTSEC-2026-0410 being exploited?
There is no confirmed exploitation: RUSTSEC-2026-0410 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is RUSTSEC-2026-0410?
It has no CVSS score yet. Unknown.
Which versions are affected by RUSTSEC-2026-0410?
zstd-sys >= 2.0.9, < 2.1.2.
Is there a fix for RUSTSEC-2026-0410?
Yes. Fixed in 2.1.2. Upgrade zstd-sys to 2.1.2 or later.
How do I check if I'm affected by RUSTSEC-2026-0410?
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.