RUSTSEC-2026-0041

Source
https://rustsec.org/advisories/RUSTSEC-2026-0041
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0041.json
JSON Data
https://api.test.osv.dev/v1/vulns/RUSTSEC-2026-0041
Aliases
Published
2026-03-17T12:00:00Z
Modified
2026-03-17T16:21:25.583877Z
Severity
  • 8.2 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
Decompressing invalid data can leak information from uninitialized memory or reused output buffer
Details

Decompressing invalid LZ4 data with the block API can leak data from uninitialized memory, or leak content from previous decompression operations when reusing an output buffer.

The LZ4 block format defines a "match copy operation" which duplicates previously written data or data from a user-supplied dict. The position of that data is defined by an offset. lz4_flex did not properly validate offset values, causing it to copy data from outside the initialized portion of the output buffer.

Two scenarios are affected:

  • Decompressing with the unsafe implementation (safe-decode feature flag disabled, which is the default): can leak content of uninitialized memory as part of the decompressed result.
  • Decompressing into a reused, user-supplied output buffer (also affects safe-decode): can leak the previous contents of the output buffer as part of the decompressed result.

Only the block-based APIs are affected. All frame APIs are unaffected.

The flaw was corrected in versions 0.11.6 and 0.12.1 by properly validating offset values during decompression.

If upgrading is not possible, the issue can be mitigated by zeroing the output buffer before each call to the affected functions and enabling the safe-decode feature flag.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / lz4_flex

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.11.6
Introduced
0.12.0
Fixed
0.12.1

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "arch": [],
        "functions": [
            "lz4_flex::block::decompress",
            "lz4_flex::block::decompress_into",
            "lz4_flex::block::decompress_into_with_dict",
            "lz4_flex::block::decompress_size_prepended",
            "lz4_flex::block::decompress_size_prepended_with_dict",
            "lz4_flex::block::decompress_with_dict"
        ],
        "os": []
    }
}

Database specific

source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0041.json"
categories
[
    "memory-exposure"
]
informational
null
cvss
"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"