CVE-2021-3520
MySQL vulnerability analysis and mitigation

Overview

There's a flaw in lz4 (CVE-2021-3520) discovered in April 2021. 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 vulnerability affects lz4 version 1.8.3 and versions up to (excluding) 1.9.4 (Red Hat Bugzilla).

Technical details

In the LZ4decompressgeneric() routine, outputSize is retrieved from the lz4 file as an integer. A code path allows outputSize to influence the value of 'length' via 'oend' in the call to memmove(op, ip, length). A crafted file can cause outputSize to be a negative value, and since length is interpreted by memmove() as a size_t, it can be an extremely large, out-of-bounds value. The vulnerability has been assigned a CVSS v3.1 base score of 9.8 CRITICAL with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

The vulnerability has significant impact on system security. The greatest impact is to availability, with some potential impact to confidentiality and integrity as well. A successful exploit could lead to out-of-bounds write operations, system crashes, and potential code execution (Red Hat Bugzilla).

Mitigation and workarounds

The vulnerability has been fixed in lz4 version 1.9.4. The upstream patch checks to ensure that outputSize is not less than 0 at the beginning of the LZ4decompressgeneric() routine. Organizations should upgrade to the fixed version. Multiple vendors have released patches for their affected products, including Red Hat, Oracle, and NetApp (Red Hat Bugzilla, NetApp Advisory).

Additional resources


SourceThis report was generated using AI

Related MySQL vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-53054MEDIUM5.5
  • MySQLMySQL
  • mecab-ipadic-EUCJP
NoYesOct 21, 2025
CVE-2025-53053MEDIUM5.5
  • MySQLMySQL
  • mecab
NoYesOct 21, 2025
CVE-2025-53069MEDIUM4.9
  • MySQLMySQL
  • mysql:8.4::mysql-common
NoYesOct 21, 2025
CVE-2025-53067MEDIUM4.9
  • MySQLMySQL
  • cpe:2.3:a:oracle:mysql_server
NoYesOct 21, 2025
CVE-2025-53062MEDIUM4.9
  • MySQLMySQL
  • mysql-libs
NoYesOct 21, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management