VulnarioBloglibxml2 vulnerabilities

libxml2 Vulnerabilities: The 10 Most Critical libxml2 Security Bugs (CVEs)

libxml2 vulnerabilities are security flaws in libxml2 that attackers can abuse to steal data, take over a server or interrupt a service. libxml2 is the XML parsing library embedded in countless applications. The National Vulnerability Database (NVD) lists 115 CVEs for libxml2, 10 of them rated critical, and 14 were published in the last 12 months. None of them is currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog for the product entries we checked.

This guide lists the 10 most critical libxml2 security bugs, with the CVE number, CVSS score, affected versions and what to do about each one. It also covers libxml2 security basics and a free way to be told about the next libxml2 CVE as soon as it is published.

Key takeaways

  • No libxml2 CVE is currently in CISA's KEV catalog for the entries we checked, but critical flaws still get exploited quickly once details are public.
  • 10 libxml2 CVEs are rated critical (CVSS v3), and 14 new ones were published in the last 12 months.
  • The newest CVE in this guide is CVE-2026-6653, published Jun 22, 2026.
  • You can monitor libxml2 for free. Vulnario emails you when a new CVE matches your version and the rest of your stack.

How we ranked these libxml2 CVEs

We ranked CVEs first by whether CISA lists them as exploited, then by CVSS score (v3 scores before the older v2 scale, which is marked when used), then by publication date (newest first). When a technology has several product entries in NVD, we combined them and removed duplicates. This favors the bugs that matter most in practice, so the guide is a list of the most critical flaws we found, not a complete history.

Every CVE number, score, date and affected version below comes from the NVD record and the CISA KEV catalog, checked on Nov 3, 2026. Scores can change when NVD reanalyzes a record, so open the linked record if you need the current value.

The 10 most critical libxml2 CVEs at a glance

Most critical libxml2 vulnerabilities (data from NVD and CISA KEV)
#CVECVSSPublishedTypeCISA KEV
1CVE-2026-66539.8 Critical2026-06-22Use after freeNo
2CVE-2024-561719.8 Critical2025-02-18Use after freeNo
3CVE-2017-73759.8 Critical2018-02-19XML external entity (XXE)No
4CVE-2017-73769.8 Critical2018-02-19Memory buffer overflowNo
5CVE-2017-169319.8 Critical2017-11-23Memory buffer overflowNo
6CVE-2016-46589.8 Critical2016-09-25Memory buffer overflowNo
7CVE-2016-44489.8 Critical2016-06-09Critical security flawNo
8CVE-2015-87109.8 Critical2016-04-11Memory buffer overflowNo
9CVE-2024-408969.1 Critical2024-12-23XML external entity (XXE)No
10CVE-2017-88729.1 Critical2017-05-10Out-of-bounds readNo

Each libxml2 CVE explained

1. CVE-2026-6653: Use after free

  • CVSS 9.8 Critical
  • Published 2026-06-22
  • CWE-416
What NVD says
Use After Free in libxml2's xmlParseInternalSubset from GNOME libxml2 version 2.9.11 to 2.11.0 allows a remote attacker to cause a denial-of-service via maliciously crafted XML input with improper entity resolution handling.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
2.9.11 through 2.11.0
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2026-6653 (opens in a new tab)

2. CVE-2024-56171: Use after free

  • CVSS 9.8 Critical
  • Published 2025-02-18
  • CWE-416
What NVD says
libxml2 before 2.12.10 and 2.13.x before 2.13.6 has a use-after-free in xmlSchemaIDCFillNodeTables and xmlSchemaBubbleIDCNodeTables in xmlschemas.c. To exploit this, a crafted XML document must be validated against an XML schema with certain identity constraints, or a crafted XML schema must be used.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 2.12.10; 2.13.0 to before 2.13.6
What to do
Upgrade to the fixed release for your branch (2.12.10, 2.13.6) or a later one, then restart the service.

NVD record for CVE-2024-56171 (opens in a new tab)

3. CVE-2017-7375: XML external entity (XXE)

  • CVSS 9.8 Critical
  • Published 2018-02-19
  • CWE-611
What NVD says
A flaw in libxml2 allows remote XML entity inclusion with default parser flags (i.e., when the caller did not request entity substitution, DTD validation, external DTD subset loading, or default DTD attributes).
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
up to and including 2.9.4; 2.9.4
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2017-7375 (opens in a new tab)

4. CVE-2017-7376: Memory buffer overflow

  • CVSS 9.8 Critical
  • Published 2018-02-19
  • CWE-119
What NVD says
Buffer overflow in libxml2 allows remote attackers to execute arbitrary code by leveraging an incorrect limit for port values when handling redirects.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 2.9.5
What to do
Upgrade to 2.9.5 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2017-7376 (opens in a new tab)

5. CVE-2017-16931: Memory buffer overflow

  • CVSS 9.8 Critical
  • Published 2017-11-23
  • CWE-119
What NVD says
parser.c in libxml2 before 2.9.5 mishandles parameter-entity references because the NEXTL macro calls the xmlParserHandlePEReference function in the case of a '%' character in a DTD name.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
up to and including 2.9.4
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2017-16931 (opens in a new tab)

6. CVE-2016-4658: Memory buffer overflow

  • CVSS 9.8 Critical
  • Published 2016-09-25
  • CWE-119
What NVD says
xpointer.c in libxml2 before 2.9.5 (as used in Apple iOS before 10, OS X before 10.12, tvOS before 10, and watchOS before 3, and other products) does not forbid namespace nodes in XPointer ranges, which allows remote attackers to execute arbitrary code or cause a denial of service (use-after-free and memory corruption) via a crafted XML document.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 2.9.5
What to do
Upgrade to 2.9.5 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2016-4658 (opens in a new tab)

7. CVE-2016-4448: Critical security flaw

  • CVSS 9.8 Critical
  • Published 2016-06-09
  • CWE-134
What NVD says
Format string vulnerability in libxml2 before 2.9.4 allows attackers to have unspecified impact via format string specifiers in unknown vectors.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
up to and including 2.9.3
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2016-4448 (opens in a new tab)

8. CVE-2015-8710: Memory buffer overflow

  • CVSS 9.8 Critical
  • Published 2016-04-11
  • CWE-119
What NVD says
The htmlParseComment function in HTMLparser.c in libxml2 allows attackers to obtain sensitive information, cause a denial of service (out-of-bounds heap memory access and application crash), or possibly have unspecified other impact via an unclosed HTML comment.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 2.9.3
What to do
Upgrade to 2.9.3 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2015-8710 (opens in a new tab)

9. CVE-2024-40896: XML external entity (XXE)

  • CVSS 9.1 Critical
  • Published 2024-12-23
  • CWE-611
What NVD says
In libxml2 2.11 before 2.11.9, 2.12 before 2.12.9, and 2.13 before 2.13.3, the SAX parser can produce events for external entities even if custom SAX handlers try to override entity content (by setting "checked"). This makes classic XXE attacks possible.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on integrity and availability.
Affected versions
2.11.0 to before 2.11.9; 2.12.0 to before 2.12.9; 2.13.0 to before 2.13.3
What to do
Upgrade to the fixed release for your branch (2.11.9, 2.12.9, 2.13.3) or a later one, then restart the service.

NVD record for CVE-2024-40896 (opens in a new tab)

10. CVE-2017-8872: Out-of-bounds read

  • CVSS 9.1 Critical
  • Published 2017-05-10
  • CWE-125
What NVD says
The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality and availability.
Affected versions
2.9.4
What to do
Apply the vendor's security update for your release and restart the service.

NVD record for CVE-2017-8872 (opens in a new tab)

How to check if your libxml2 is vulnerable

Find the exact version first, then compare it with the affected and fixed versions in each CVE above.

xml2-config --version

On Linux, Debian, Ubuntu and RHEL-based distributions often backport security fixes and keep the old version number, so a package that looks old can already be patched. Check your distribution's own security tracker or the package changelog before concluding that a server is exposed.

libxml2 security checklist

  1. Update through your distribution's package manager and restart services that load the library.
  2. Do not feed untrusted input to the tool without validation or sandboxing.
  3. Track where it is embedded in your software, since many applications bundle their own copy.
  4. Run processing jobs as an unprivileged user with limited resources.

Where you run libxml2 matters as much as how you patch it. Whether your site lives on a VPS, a dedicated server or shared hosting (opens in a new tab), check who is responsible for updating libxml2: on most plans the operating system and applications are yours to patch unless the plan says otherwise.

Your stack is bigger than libxml2. A flaw anywhere in the chain can be the way in, so also review our guides to PHP vulnerabilities, Python vulnerabilities and Nginx vulnerabilities.

How to get alerted about new libxml2 vulnerabilities

NVD received 14 new libxml2 CVEs in the last twelve months, and critical ones can be exploited within days. Reading advisories by hand is easy to forget, so most teams automate it. You have three practical options:

  • Follow the vendor's announcements and your distribution's security list. They are accurate but cover only one product and you read them manually.
  • Query the NVD feed yourself. It is complete and needs scripting, filtering and a mail or chat integration to maintain.
  • Use a stack-based alert service. You pick your technologies once and receive an email when a matching CVE appears.

Vulnario is the third option, and it is free to start. It scans the National Vulnerability Database, the CISA KEV catalog and GitHub Security Advisories every hour. You choose libxml2 and the rest of your stack, confirm your email with a code, and the alerts begin. Each email includes the CVE number, the CVSS score, a marker when CISA lists the flaw as actively exploited, the attack vector, a patch or advisory link and a suggested time frame to fix it.

  • Free: all technologies, alerts grouped at most every 12 hours.
  • Pro ($29/month): alerts are sent on the next hourly scan, so you hear about a new CVE up to 12 hours earlier.

Few stacks run libxml2 alone. These guides cover the technologies it is most often deployed with.

Frequently asked questions about libxml2 vulnerabilities

What are the most critical libxml2 vulnerabilities?

Based on NVD scores and CISA's exploited-vulnerability catalog, the most critical libxml2 CVEs include CVE-2026-6653 (CVSS 9.8), CVE-2024-56171 (CVSS 9.8), CVE-2017-7375 (CVSS 9.8). The guide above ranks the 10 most critical with affected versions and fixes.

Have libxml2 vulnerabilities been exploited in real attacks?

For the libxml2 product entries we checked, none of the CVEs is currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog. A CVE can still be exploited before it is added, so keep libxml2 patched.

How many vulnerabilities does libxml2 have?

As of Nov 3, 2026 the National Vulnerability Database lists 115 CVEs for libxml2, with 10 rated critical by CVSS v3. 14 were published in the previous twelve months.

How do I check which libxml2 version I run?

Run xml2-config --version on the server and compare the result with the fixed versions in each CVE. On Debian, Ubuntu and RHEL-based systems, fixes are often backported without changing the version number, so also check your distribution's security tracker.

How can I get alerted when a new libxml2 CVE is published?

Add libxml2 to a service that watches the National Vulnerability Database, CISA KEV and GitHub Security Advisories. Vulnario does this for free: choose libxml2 and the rest of your stack, verify your email, and you receive an alert when a new CVE matches. Free alerts are grouped at most every 12 hours, and Pro sends them on the next hourly scan.

Is libxml2 secure?

libxml2 is as secure as its patch level. NVD published 14 new libxml2 CVEs in the last twelve months, so running a current, supported release and applying security updates promptly is the most effective protection.

What is CVE-2026-6653?

CVE-2026-6653 is a critical libxml2 vulnerability with a CVSS score of 9.8, published Jun 22, 2026. Use After Free in libxml2's xmlParseInternalSubset from GNOME libxml2 version 2.9.11 to 2.11.0 allows a remote attacker to cause a denial-of-service via maliciously crafted XML input with improper entity resolution handling.

Sources

This article is informational and not a substitute for your own risk assessment. CVSS scores and affected versions may change when NVD updates a record.