Vulnerabilities / CVE-2021-3520

critical

CVE-2021-3520

lz4: memory corruption due to an integer overflow bug caused by memmove argument

Published Modified CWE 190, 787
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat8.6CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
Julia9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, Julia, Photon OS. Rated lower by Red Hat (medium), AlmaLinux (medium), Amazon (medium), Oracle (medium), Rocky Linux (medium), Ubuntu (medium).

Description

There's a flaw in lz4. An attacker who submits a crafted file to an application linked with lz4 may be able to trigger an integer overflow, leading to calling of memmove() on a negative size argument, causing an out-of-bounds write and/or a crash. The greatest impact of this flaw is to availability, with some potential impact to confidentiality and integrity as well.

Affected packages and fixed versions

SourcePackageFixed in
julia::Julia Ecosystem Security AdvisoriesLz4_jll1.9.4+0
Photon OS 2.0lz41.9.2-2.ph2
Photon OS 3.0librdkafka, lz4, mysql1.5.0-1.ph3 and 2 more
Photon OS 4.0librdkafka, librdkafka-devel, lz4 and 4 more1.5.0-2.ph4 and 2 more
Photon OS 5.0librdkafka, librdkafka-devel, mysql and 2 more1.8.2-2.ph5 and 1 more
alma 8lz4, lz4-devel, lz4-libs1.8.3-3.el8_4
alpine 3.12lz41.9.2-r1
alpine 3.13lz41.9.2-r1
alpine 3.14lz41.9.3-r1
alpine 3.15lz41.9.3-r1
alpine 3.16lz41.9.3-r1
alpine 3.17lz41.9.3-r1
Show all 73 entries from 41 sources
SourcePackageFixed in
julia::Julia Ecosystem Security AdvisoriesLz4_jll1.9.4+0
Photon OS 2.0lz41.9.2-2.ph2
Photon OS 3.0librdkafka1.5.0-1.ph3
Photon OS 3.0lz41.9.3-2.ph3
Photon OS 3.0mysql8.0.34-1.ph3
Photon OS 4.0librdkafka1.5.0-2.ph4
Photon OS 4.0librdkafka-devel1.5.0-2.ph4
Photon OS 4.0lz41.9.2-2.ph4
Photon OS 4.0lz4-devel1.9.2-2.ph4
Photon OS 4.0mysql8.0.34-1.ph4
Photon OS 4.0mysql-devel8.0.34-1.ph4
Photon OS 4.0mysql-icu-data-files8.0.34-1.ph4
Photon OS 5.0librdkafka1.8.2-2.ph5
Photon OS 5.0librdkafka-devel1.8.2-2.ph5
Photon OS 5.0mysql8.0.34-1.ph5
Photon OS 5.0mysql-devel8.0.34-1.ph5
Photon OS 5.0mysql-icu-data-files8.0.34-1.ph5
alma 8lz41.8.3-3.el8_4
alma 8lz4-devel1.8.3-3.el8_4
alma 8lz4-libs1.8.3-3.el8_4
alpine 3.12lz41.9.2-r1
alpine 3.13lz41.9.2-r1
alpine 3.14lz41.9.3-r1
alpine 3.15lz41.9.3-r1
alpine 3.16lz41.9.3-r1
alpine 3.17lz41.9.3-r1
alpine 3.18lz41.9.3-r1
alpine 3.19lz41.9.3-r1
alpine 3.20lz41.9.3-r1
alpine 3.21lz41.9.3-r1
alpine 3.22lz41.9.3-r1
alpine 3.23lz41.9.3-r1
alpine 3.24lz41.9.3-r1
alpine edgelz41.9.3-r1
amazon linux 2022lz41.9.4-1.amzn2022.0.1
amazon linux 2022lz4-debuginfo1.9.4-1.amzn2022.0.1
amazon linux 2022lz4-debugsource1.9.4-1.amzn2022.0.1
amazon linux 2022lz4-devel1.9.4-1.amzn2022.0.1
amazon linux 2022lz4-libs1.9.4-1.amzn2022.0.1
amazon linux 2022lz4-libs-debuginfo1.9.4-1.amzn2022.0.1
amazon linux 2022lz4-static1.9.4-1.amzn2022.0.1
amazon linux 2023lz41.9.4-1.amzn2023.0.2
amazon linux 2023lz4-debuginfo1.9.4-1.amzn2023.0.2
amazon linux 2023lz4-debugsource1.9.4-1.amzn2023.0.2
amazon linux 2023lz4-devel1.9.4-1.amzn2023.0.2
amazon linux 2023lz4-libs1.9.4-1.amzn2023.0.2
amazon linux 2023lz4-libs-debuginfo1.9.4-1.amzn2023.0.2
amazon linux 2023lz4-static1.9.4-1.amzn2023.0.2
conan::GitLab Advisory Database Communitylz41.9.2
debian 10lz41.8.3-1+deb10u1
debian 11lz41.9.3-2
debian 12lz41.9.3-2
debian 13lz41.9.3-2
debian 14lz41.9.3-2
debian 9lz40.0~r131-2+deb9u1
echolz41.9.3-2
Oracle Linux 8lz41.8.3-3.el8_4
Oracle Linux 8lz4-devel1.8.3-3.el8_4
Oracle Linux 8lz4-libs1.8.3-3.el8_4
Red Hatlz4no fix listed
Red Hatlz4-develno fix listed
Red Hatlz4-staticno fix listed
rocky 8lz41.8.3-3.el8_4
rocky 8lz4-devel1.8.3-3.el8_4
rocky 8lz4-libs1.8.3-3.el8_4
ubuntu 14.04-ESMlz40.0~r114-2ubuntu1+esm2
ubuntu 16.04-ESMlz40.0~r131-2ubuntu2+esm1
ubuntu 18.04lz40.0~r131-2ubuntu3.1
ubuntu 18.04-ESMlz40.0~r131-2ubuntu3.1
ubuntu 20.04lz41.9.2-2ubuntu0.20.04.1
ubuntu 20.04-ESMlz41.9.2-2ubuntu0.20.04.1
ubuntu 20.10lz41.9.2-2ubuntu0.20.10.1
ubuntu 21.04lz41.9.3-1ubuntu0.1

References

All 17 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.