libxml2 vulnerabilities
48 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-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-27113Medium
In libxml2 before 2.12.10 and 2.13.6, a NULL pointer dereference exists in xmlPatMatch in pattern.c.
- 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-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-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-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-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-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.
- CVE-2026-1757Medium
A flaw was identified in the interactive shell of the xmllint utility, part of the libxml2 project, where memory allocated for user input is not properly released under certain conditions. When a user submits input consisting only of whitespace, the program skips command execution but fails to free the allocated buffer. Repeating this action causes memory to continuously accumulate. Over time, this can exhaust system memory and terminate the xmllint process, creating a denial-of-service condition on the local system.
- CVE-2026-0992Low
A flaw was found in the libxml2 library where uncontrolled resource consumption occurs when processing XML catalogs with repeated <nextCatalog> elements pointing to the same downstream catalog. A remote attacker can exploit this by supplying crafted catalogs, causing redundant traversal of catalog chains.
- CVE-2026-0990Medium
An uncontrolled recursion vulnerability was found in libxml2's xmlCatalogXMLResolveURI function. It occurs when an XML catalog contains a delegate URI entry that references itself, leading to infinite recursion and call stack exhaustion.
- CVE-2026-0989Low
A flaw was found in the RelaxNG parser of libxml2 related to handling external schema inclusions. The parser does not enforce a limit on inclusion depth when resolving nested <include> directives, which can cause excessive recursion. Specially crafted schemas may lead to stack exhaustion and application crashes.
- CVE-2025-8732Low
A vulnerability was found in libxml2 up to version 2.14.5, involving uncontrolled recursion in the xmlParseSGMLCatalog function of the xmlcatalog component. The attack requires local access and can be triggered with untrusted SGML catalogs.
- CVE-2025-6170Low
A flaw in the interactive shell of the xmllint XML parsing tool causes overly long commands to not be properly size-checked, potentially leading to a crash. In rare configurations without modern protections, arbitrary code execution may be possible.
- CVE-2025-49795High
A NULL pointer dereference vulnerability was found in libxml2 when processing XPath XML expressions. This flaw allows an attacker to craft a malicious XML input to libxml2, leading to a denial of service.
- CVE-2025-6021High
A flaw in libxml2's xmlBuildQName function causes integer overflows in buffer size calculations, leading to a stack-based buffer overflow. This can result in memory corruption or denial of service when processing crafted input.

