libxml2 vulnerabilities
58 known CVE vulnerabilities in libxml2, translated and rated.
- CVE-2017-16932High
The parser.c file in libxml2 before version 2.9.5 does not prevent infinite recursion in parameter entities.
- CVE-2017-7013High
An issue was discovered in certain Apple products related to the 'libxml2' component. Affects iOS before 10.3.3, macOS before 10.12.6, iCloud before 6.2.2 on Windows, iTunes before 12.6.2 on Windows, tvOS before 10.2.2, and watchOS before 3.2.3.
- CVE-2017-7010High
An issue was discovered in certain Apple products related to the 'libxml2' component. It affects iOS before 10.3.3, macOS before 10.12.6, iCloud before 6.2.2 on Windows, iTunes before 12.6.2 on Windows, and tvOS before 10.2.2.
- CVE-2017-0663High
A remote code execution vulnerability in libxml2 could allow an attacker to execute arbitrary code within the context of an unprivileged process. This issue affects applications using this library on Android.
- CVE-2017-9050High
libxml2 version 20904-GITv2.9.4-16-g0741801 is vulnerable to a heap-based buffer over-read in the xmlDictAddString function in dict.c. This vulnerability causes programs that use libxml2, such as PHP, to crash. The issue exists due to an incomplete fix for CVE-2016-1839.
- CVE-2017-9049High
libxml2 version 20904-GITv2.9.4-16-g0741801 is vulnerable to a heap-based buffer over-read in the xmlDictComputeFastKey function in dict.c. This vulnerability causes programs that use libxml2, such as PHP, to crash.
- CVE-2017-9048High
libxml2 version 20904-GITv2.9.4-16-g0741801 is vulnerable to a stack-based buffer overflow. The function xmlSnprintfElementContent in valid.c may strcat two more characters to the buffer without checking if the size allows it.
- CVE-2017-9047High
A buffer overflow was discovered in the libxml2 library in the xmlSnprintfElementContent function, which can lead to writing data beyond allocated memory. The issue arises when the buffer length check does not account for the updated length after appending the prefix.
- CVE-2016-4483High
The xmlBufAttrSerializeTxtContent function in xmlsave.c in libxml2 allows context-dependent attackers to cause a denial of service (out-of-bounds read and application crash) via a non-UTF-8 attribute value, related to serialization.
- CVE-2016-4449High
CVE-2016-4449 describes an XXE vulnerability in the xmlStringLenDecodeEntities function in parser.c in libxml2 before version 2.9.4. This vulnerability, when not in validating mode, allows attackers to read arbitrary files or cause denial of service through unspecified vectors.
- CVE-2016-4447High
The xmlParseElementDecl function in libxml2 before version 2.9.4 allows context-dependent attackers to cause a denial of service via a crafted file, resulting in heap-based buffer underread and application crash.
- CVE-2016-1840High
Heap-based buffer overflow in the xmlFAParsePosCharGroup function in libxml2 before version 2.9.4 allows remote attackers to execute arbitrary code or cause a denial of service via a crafted XML document.
- CVE-2016-1835High
Use-after-free vulnerability in the xmlSAX2AttributeNs function in libxml2 before version 2.9.4, as used in Apple iOS before 9.3.2 and OS X before 10.11.5, allows remote attackers to cause a denial of service via a crafted XML document.
- CVE-2016-1834High
Heap-based buffer overflow in the xmlStrncat function in libxml2 before version 2.9.4, used in Apple iOS before 9.3.2, OS X before 10.11.5, tvOS before 9.2.1, and watchOS before 2.2.1, allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted XML document.
- CVE-2016-3705High
The xmlParserEntityCheck and xmlParseAttValueComplex functions in libxml2 2.9.3 do not properly keep track of the recursion depth, allowing context-dependent attackers to cause a denial of service via a crafted XML document containing a large number of nested entity references.
- CVE-2016-3627High
The xmlStringGetNodeList function in libxml2 version 2.9.3 and earlier, when used in recovery mode, allows context-dependent attackers to cause a denial of service through a crafted XML document, leading to infinite recursion, stack consumption, and application crash.
- CVE-2015-8806High
The dict.c file in libxml2 contains a vulnerability that allows remote attackers to cause a denial of service through heap-based buffer over-read and application crash. This issue occurs when an unexpected character is encountered immediately after the '<!DOCTYPE html' substring in a crafted HTML document.
- CVE-2016-1762High
The xmlNextChar function in libxml2 before version 2.9.4 allows remote attackers to cause a denial of service (heap-based buffer over-read) via a crafted XML document.
- CVE-2015-5312High
The xmlStringLenDecodeEntities function in libxml2 before version 2.9.3 does not properly prevent entity expansion, allowing context-dependent attackers to cause a denial of service (CPU consumption) via crafted XML data.
- CVE-2024-56171Medium
In libxml2 before 2.12.10 and 2.13.6, a use-after-free exists in xmlSchemaIDCFillNodeTables and xmlSchemaBubbleIDCNodeTables in xmlschemas.c. Exploitation requires validation of a crafted XML document against an XML schema with identity constraints or a crafted schema.
- CVE-2025-27113Medium
In libxml2 before 2.12.10 and 2.13.6, a NULL pointer dereference exists in xmlPatMatch in pattern.c.
- CVE-2022-49043Medium
In libxml2 before 2.11.0, xmlXIncludeAddNode in xinclude.c has a use-after-free vulnerability.
- CVE-2025-24928Medium
In libxml2 before 2.12.10 and 2.13.6, a stack-based buffer overflow exists in xmlSnprintfElements in valid.c. Exploitation requires DTD validation of an untrusted document or untrusted DTD. Similar to CVE-2017-9047.
- CVE-2025-32414Medium
In libxml2 before 2.13.8 and 2.14.2, out-of-bounds memory access occurs in the Python API due to an incorrect return value in xmlPythonFileRead and xmlPythonFileReadRaw.
- CVE-2025-32415Medium
In libxml2 before 2.13.8 and 2.14.2, a heap-based buffer under-read exists in xmlSchemaIDCFillNodeTables in xmlschemas.c. Exploitation requires validation of a crafted XML document against an XML schema with identity constraints or a crafted schema.
- CVE-2024-34459Low
In xmllint from libxml2 before versions 2.11.8 and 2.12.7, formatting error messages with --htmlout can cause a buffer over-read in xmlHTMLPrintFileContext.
- CVE-2026-6653Critical
A Use After Free vulnerability in the xmlParseInternalSubset function of libxml2 versions 2.9.11 through 2.11.0 allows a remote attacker to cause a denial-of-service (DoS) via specially crafted XML input with improper entity resolution.
- CVE-2025-49796Critical
A vulnerability was found in libxml2 where processing certain sch:name elements from an input XML file can trigger memory corruption. An attacker can craft a malicious XML file that causes libxml to crash, leading to denial of service or other undefined behavior due to sensitive data being corrupted in memory.
- CVE-2025-49794Critical
A use-after-free vulnerability was found in libxml2 when parsing XPath elements under certain circumstances with XML schematron containing <sch:name path="..."/> elements. This flaw allows a malicious actor to craft a malicious XML document that, when processed by libxml, can cause program crashes or other undefined behaviors.
- CVE-2017-16931Critical
In libxml2 before version 2.9.5, there is an issue with handling parameter-entity references because the NEXTL macro calls the xmlParserHandlePEReference function in the case of a '%' character in a DTD name.
- CVE-2017-8872Critical
The htmlParseTryOrFinish function in HTMLparser.c in libxml2 version 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure.
- CVE-2016-4658Critical
The xpointer.c file in libxml2 before version 2.9.5 does not forbid namespace nodes in XPointer ranges, allowing remote attackers to execute arbitrary code or cause a denial of service via a crafted XML document.
- CVE-2016-4616Critical
libxml2 in Apple iOS before 9.3.3, OS X before 10.11.6, iTunes before 12.4.2 on Windows, iCloud before 5.2.1 on Windows, tvOS before 9.2.2, and watchOS before 2.2.2 allows remote attackers to cause a denial of service (memory corruption) or possibly have unspecified other impact via unknown vectors.
- CVE-2016-4615Critical
libxml2 in Apple iOS before 9.3.3, OS X before 10.11.6, iTunes before 12.4.2 on Windows, iCloud before 5.2.1 on Windows, tvOS before 9.2.2, and watchOS before 2.2.2 allows remote attackers to cause a denial of service (memory corruption) or possibly have unspecified other impact via unknown vectors.
- CVE-2016-4614Critical
libxml2 in Apple iOS before 9.3.3, OS X before 10.11.6, iTunes before 12.4.2 on Windows, iCloud before 5.2.1 on Windows, tvOS before 9.2.2, and watchOS before 2.2.2 allows remote attackers to cause a denial of service (memory corruption) or possibly have unspecified other impact via unknown vectors.
- CVE-2016-4448Critical
A format string vulnerability in libxml2 before version 2.9.4 allows attackers to have unspecified impact via format string specifiers in unknown vectors.
- CVE-2015-8710Critical
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.
- CVE-2016-1761Critical
libxml2 in Apple iOS before 9.3, OS X before 10.11.4, and watchOS before 2.2 allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted XML document.
- CVE-2026-76781Medium
A flaw was found in libxml2. A local user or an attacker providing a specially crafted XML catalog can trigger a NULL pointer dereference during XML catalog parsing. This occurs when a `nextCatalog` element lacks its mandatory `catalog` attribute, leading to the application crashing and causing a Denial of Service (DoS).
- CVE-2026-74860High
In libxml2 with Python bindings enabled, a remote attacker could exploit a specially crafted XML document containing a DTD with enumerated attribute values. This triggers a double-free error in the SAX attributeDecl callback handler, where a string is freed twice. This flaw can lead to a denial of service (DoS) due to a reproducible crash in Python applications using the libxml2 SAX bindings.
- CVE-2026-86144Medium
In libxml2 before 2.15.4, xmlXIncludeProcess and xmlXIncludeProcessTree do not propagate parseFlags. This has security relevance for, for example, the XML_PARSE_NONET flag, if (without it) a custom resource loader accesses the internet and triggers XML external entity injection, SSRF, or a denial of service.
- CVE-2026-86143Medium
In libxml2 before 2.15.4, an inconsistency in xmlIO between xmlOutputWriteCallback and xmlBufUse causes negative lengths to reach write callbacks, due to a missing integer overflow check before invoking the write callback. This has security implications for many uses of that length value within a callback.
- CVE-2026-86142Medium
In libxml2 before 2.15.4, there is a heap-based buffer overflow in xmlXPtrEvalXPtrPart due to length saturation in xmlXPtrEval for xpointer expressions.
- CVE-2026-86141Low
In libxml2 before 2.15.4, xmlregexp in xmlRegNewParserCtxt has a NULL pointer dereference after a strdup failure, i.e., it does not calculate a string length after NULL checking.
- CVE-2026-86140High
In libxml2 before 2.15.4, xmlSnprintfElements in valid.c has a strcat stack-based buffer overflow.
- CVE-2026-86139Medium
In libxml2 before 2.15.4, xmlURIEscapeStr in uri.c has an integer overflow.
- CVE-2026-86138Medium
In libxml2 before 2.15.4, xmlDictAddQString in dict.c has an integer overflow leading to a heap-based buffer overflow.
- CVE-2026-86137Low
In libxml2 before version 2.15.4, there is an out-of-bounds read vulnerability in the xmlFAParsePosCharGroup function, related to the NXT macro in xmlregexp.
- CVE-2026-11979High
Multiple stack-based buffer overflows were discovered in the xmlcatalog utility of libxml2 when running in --shell mode. The usershell() function processes user input using fixed-size stack buffers without proper bounds checking. Supplying an overly long input line can overflow internal buffers (command, arg, and argv) during input parsing.
- CVE-2026-6732Medium
A type confusion flaw was found in libxml2 when processing a specially crafted XML Schema Definition (XSD) validated document that includes an internal entity reference. An attacker can exploit this by providing a malicious document, causing the application to crash.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

