Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

Skip to content
Check your stack
RUSTSEC-2026-0405No CVE assigned

Out-of-bounds read with an out-of-range InBuffer::pos

Products / packages zstd-safe

Published

Share

Severity and exploitation

KEV unavailable / staleNo CVSS score

KEV coverage does not rule out exploitation.

KEV checked 28/11/2026, 22:10:32 UTC

Severity

unknown

CVSS measures technical severity, not the likelihood of an attack.

Known exploitation

KEV status unavailable or stale

Absence from CISA KEV does not rule out attacks.

Public exploit

Not established by this record

Missing evidence does not mean no public exploit exists.

Remediation

Package fixes recorded

Fix versions are recorded for 1 of 1 mapped packages. Check each release branch and any separate product guidance.

What this means

InBuffer's fields are public, so safe code can set pos past the end of src. The position was passed to the C library unchecked, and ZSTD_seekable_compressStream, unlike the other streaming functions, does not validate it: it read past the end of the input slice, by up to the frame size, and compressed that memory into the output.

Source excerpt · OSV

Attack conditions

No attack-condition excerpt has been identified here. Review the full source description and references for authentication, network access, and configuration requirements.

Review supporting sources →

Affected versions

Check the exact model, release, and any platform requirements against your installation.

Packages

Compare each installed version with the publisher’s affected ranges. Where a fix is recorded, choose the appropriate release branch and test compatibility before upgrading.

zstd-safe crates.io
Affected range Recorded fix
From 7.2.2 before 7.4.0Semantic versions7.4.0
From 8.0.0-0 before 8.2.0Semantic versions8.2.0

Version evidence: OSV · RUSTSEC-2026-0405

View original version evidence (0 explicit versions)

What to do

Compare your installed product and version with the affected versions above. A matching product name alone does not confirm exposure.

Use the recorded fix for your release branch. Review the publisher’s instructions and test compatibility before upgrading.

cve.new guidance unless attributed to a publisher. This page does not inspect your installation.

Public exploit evidence

No public exploit reference is identified in the imported evidence. This is not a claim that no exploit exists.

Original source description

Read the full publisher description

Out-of-bounds read with an out-of-range `InBuffer::pos`

InBuffer's fields are public, so safe code can set pos past the end of src. The position was passed to the C library unchecked, and ZSTD_seekable_compressStream, unlike the other streaming functions, does not validate it: it read past the end of the input slice, by up to the frame size, and compressed that memory into the output.

The flaw was corrected by checking the position before every call into the C library.

References

4 sources

Inside the record

Evidence available

Package identity
Version evidence
Remediation guidance · not supplied
Weakness classification · not supplied
Additional publishers · not supplied

Describes the evidence in this view, not whether the product is safe.

Original records

No official CVE record has been imported. Use the source links below for the original advisory.

cve.new JSON →

Timeline

All times UTC
  1. Advisory published

    Publication date supplied by the source.

  2. Source updated

    Latest modification date supplied by the source.

  3. Last imported by cve.new

    Latest catalog import, not the date we first saw this advisory.

What changed

Follow changes
No substantive changes have been recorded here yet. History starts when cve.new observes a change after tracking is enabled; earlier edits are not reconstructed.

Large field values are marked as truncated previews. Original source snapshots remain retained.

Recent advisories affecting the same package or the same recorded vendor and product. These are separate vulnerabilities, not additional evidence for this advisory.

unknown
RUSTSEC-2026-0406No CVE assignedPackage fixes recorded

Use-after-free when changing a multithreaded context with an unfinished frame

When a multithreaded frame (zstdmt feature, CParameter::NbWorkers) is left unfinished, its jobs may still be running on the worker threads: the C library only waits for them when the next frame starts, or when the context is freed. A session reset makes the context accept changes again in the meantime, so:

Recorded fixes — zstd-safe: 7.4.0 or 8.2.0. Check your release branch.

Exploitation not established

unknown
RUSTSEC-2026-0404No CVE assignedPackage fixes recorded

Double free in DCtx::try_clone

DCtx::try_clone (experimental feature, deprecated) is a plain copy of the C context. A context owning a dictionary (from load_dictionary, ref_prefix or init_using_dict) or a dictionary table (ref_ddict with RefMultipleDDicts) ended up with both copies freeing it. A context cloned mid-frame resumed on uninitialized stream state. The clone also silently lost the WindowLogMax limit.

Recorded fixes — zstd-safe: 7.4.0 or 8.2.0. Check your release branch.

Exploitation not established

unknown
RUSTSEC-2026-0403No CVE assignedPackage fixes recorded

Uninitialized memory exposed when streaming decompression of a legacy frame fails

When decompression fails inside a legacy (zstd v0.4 to v0.7) frame, the bundled zstd library reports the output buffer as fully written although nothing was written. DCtx::decompress_stream committed that position even on error, and for a Vec<u8> destination this extended the vector's length over uninitialized memory.

Recorded fixes — zstd-safe: 7.4.0 or 8.2.0. Check your release branch.

Exploitation not established

unknown
RUSTSEC-2026-0402No CVE assignedPackage fixes recorded

Heap buffer overflow in CCtx::try_clone on a multithreaded context

CCtx::try_clone (experimental feature, deprecated) copies tables sized from the context's applied parameters. Starting a multithreaded frame (zstdmt feature) replaces those parameters with the workers' without resizing the context's own tables, so after an abandoned single-threaded frame, the copy wrote up to 512 KiB past a heap allocation, or read past one. This became reachable with the bundled zstd 1.5.6.

Recorded fixes — zstd-safe: 7.4.0 or 8.2.0. Check your release branch.

Exploitation not established

unknown
RUSTSEC-2026-0401No CVE assignedPackage fixes recorded

Out-of-bounds read in train_from_buffer when sample sizes overflow

ZDICT_trainFromBuffer is never told the length of the samples buffer, so train_from_buffer checked that the sample sizes add up to it. With overflow checks off, as in release builds, that sum wrapped around: sizes totalling 2^64 plus the buffer length passed the check, and the trainer read past the end of the buffer. zstd::dict::from_continuous relies on this check from zstd 0.4.10; older versions of zstd had their own, covered by a separate advisory.

Recorded fixes — zstd-safe: 7.4.0 or 8.2.0. Check your release branch.

Exploitation not established

unknown
RUSTSEC-2026-0400No CVE assignedPackage fixes recorded

Use-after-free of a dictionary after a one-shot call on a context with an open stream

The one-shot DCtx and CCtx methods assumed the C library resets the context, but it leaves an open stream as it is. When a stream was left unfinished on a context, a one-shot call such as decompress_using_dict could leave the context pointing at the dictionary borrowed for that call, and the next streaming call resumed the stream against it after it was freed: decompressed output then contained freed heap memory. On the compression side, the stream resumed against the one-shot call's buffers.

Recorded fixes — zstd-safe: 7.4.0 or 8.2.0. Check your release branch.

Exploitation not established