# RUSTSEC-2022-0051: Memory corruption in liblz4

- Database: RustSec
- Published: 2022-08-25
- Modified: 2026-02-04

## Also published as

- [GHSA-9Q5J-JM53-V7VR](https://cve.now/GHSA-9Q5J-JM53-V7VR.md) (GitHub)

## Affected versions

- lz4-sys (crates.io): fixed in 1.9.4

## Description

lz4-sys up to v1.9.3 bundles a version of liblz4 that is vulnerable to
[CVE-2021-3520](https://nvd.nist.gov/vuln/detail/CVE-2021-3520).

Attackers could craft a payload that triggers an integer overflow upon
decompression, causing an out-of-bounds write.

The flaw has been corrected in version v1.9.4 of liblz4, which is included
in lz4-sys 1.9.4.

## References

- https://crates.io/crates/lz4-sys
- https://rustsec.org/advisories/RUSTSEC-2022-0051.html
- https://github.com/lz4/lz4/pull/972

Page: https://cve.now/RUSTSEC-2022-0051

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
