Every CVE Search/ Get API key

RUSTSEC-2026-0410

WebAssembly allocator shim corrupts memory on allocation failure

No scoreFix available

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.

What each source reports

OSV No score

WebAssembly allocator shim corrupts memory on allocation failure

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.

Record
RUSTSEC-2026-0410
Updated
2026-11-02

Affected packages

Affected packages
PackageAffectedFixed
zstd-sys
crates.io
2.0.9 up to 2.1.2
2.1.2

History

History
RecordedChangedSources
first indexedOSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

RUSTSEC-2026-0410 is a vulnerability with no CVSS score yet in zstd-sys, published October 16, 2026. No source lists public exploit code. Fixed in zstd-sys 2.1.2.

References

MoveEnter Open