Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
RUSTSEC-2026-0041
No affected components available
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
unsafeimplementation (safe-decodefeature 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.
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability.
Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard