GHSA-vvp9-7p8x-rfvv

Suggest an improvement
Source
https://github.com/advisories/GHSA-vvp9-7p8x-rfvv
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-vvp9-7p8x-rfvv/GHSA-vvp9-7p8x-rfvv.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-vvp9-7p8x-rfvv
Aliases
Related
Published
2026-03-16T20:48:08Z
Modified
2026-03-20T21:38:37.317159Z
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
lz4_flex's decompression can leak information from uninitialized memory or reused output buffer
Details

Summary

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

Details

The LZ4 block format defines a "match copy operation" which duplicates previously written data or data from the user-supplied dict. The position of that data is defined by an offset. The data is copied within the output buffer from the offset to the current output position. However, lz4_flex did not properly detect invalid and out-of-bounds offset values properly, causing it to copy uninitialized data from the output buffer.

Only the block based API functions are affected: lz4_flex::block::{decompress_into, decompress_into_with_dict}

When safe-decode is disabled additionally these functions are affected lz4_flex::block::{decompress, decompress_with_dict, decompress_size_prepended, decompress_size_prepended_with_dict}

All frame APIs are not affected.

There are two affected use cases: - decompressing LZ4 data with the unsafe implementation (safe-decode feature flag disabled, which is enabled by default): can leak content of uninitialized memory as decompressed result - decompressing LZ4 data into a reused, user-supplied output buffer (affects the safe-decode feature as well): can leak the previous contents of the output buffer as decompressed result

Impact

Leakage of data from uninitialized memory or content from previous decompression operations, possibly revealing sensitive information and secrets.

Mitigation

lz4_flex 0.12.1 and 0.11.6 fixes this issue without requiring changes in user code.

If you cannot upgrade, you can mitigate this vulnerability by zeroing the output buffer before calling block::decompress_into or block::decompress_into_with_dict (only block based API is affected, frame API is not affected). Additionally the the safe-decode feature flag should be enabled.

Database specific
{
    "severity": "HIGH",
    "nvd_published_at": "2026-03-20T01:15:56Z",
    "cwe_ids": [
        "CWE-201",
        "CWE-823"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-16T20:48:08Z"
}
References

Affected packages

crates.io / lz4_flex

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.11.6

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-vvp9-7p8x-rfvv/GHSA-vvp9-7p8x-rfvv.json"

crates.io / lz4_flex

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.12.0
Fixed
0.12.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-vvp9-7p8x-rfvv/GHSA-vvp9-7p8x-rfvv.json"