CVE-2021-3517: Buffer Overflow
A heap-based buffer overflow was found in libxml2 when processing truncated UTF-8 input.
Reference: https://gitlab.gnome.org/GNOME/libxml2/-/issues/235
Upstream patch: https://gitlab.gnome.org/GNOME/libxml2/-/commit/bf22713507fe1fc3a2c4b525cf0a88c2dc87a3a2
Other sources
GNOME libxml2 is vulnerable to a heap-based buffer overflow, caused by improper bounds checking by xmlEncodeEntitiesInternal() in entities.c. By sending a specially crafted file, a remote attacker could trigger an out-of-bounds read and execute arbitrary code on the system or cause a denial of service.
— IBM
There is a flaw in the xml entity encoding functionality of libxml2 in versions before 2.9.11. An attacker who is able to supply a crafted file to be processed by an application linked with the affected functionality of libxml2 could trigger an out-of-bounds read. The most likely impact of this flaw is to application availability, with some potential impact to confidentiality and integrity if an attacker is able to use memory information to further exploit the application.
There is a flaw in the xml entity encoding functionality of libxml2. An attacker who is able to supply a crafted file to be processed by an application linked with the affected functionality of libxml2 could trigger an out-of-bounds read. The most likely impact of this flaw is to application availability, with some potential impact to confidentiality and integrity if an attacker is able to use memory information to further exploit the application.
Affected Software
Remediation
Patch Available
Patch Available
Patch Available
Patch Available
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the vulnerability ID?
The vulnerability ID is CVE-2021-3517.
What is the severity of CVE-2021-3517?
The severity of CVE-2021-3517 is high with a CVSS score of 8.6.
What is the affected software?
The affected software includes libxml2 versions before 2.9.11, Nokogiri version up to 1.11.4, and certain Red Hat packages.
How does the vulnerability occur?
The vulnerability occurs due to a heap-based buffer overflow caused by improper bounds checking in the xml entity encoding functionality of libxml2.
Is there a fix available for CVE-2021-3517?
Yes, a fix is available. Update to libxml2 version 2.9.11 or higher, or follow the recommended remediation for the affected software packages.