Expat vulnerabilities
23 known CVE vulnerabilities in Expat, translated and rated.
- CVE-2022-25315Critical
In Expat (aka libexpat) before 2.4.5, there is an integer overflow in storeRawNames.
- CVE-2022-25314High
In Expat (libexpat) before 2.4.5, there is an integer overflow in copyString.
- CVE-2022-25236Critical
In xmlparse.c in Expat (aka libexpat) before 2.4.5, attackers can insert namespace-separator characters into namespace URIs.
- CVE-2022-25235Critical
In xmltok_impl.c in Expat (aka libexpat) before 2.4.5 lacks certain validation of encoding, such as checks for whether a UTF-8 character is valid in a certain context.
- CVE-2022-23990High
Expat (libexpat) before 2.4.4 has an integer overflow in the doProlog function. This may lead to improper XML parser behavior.
- CVE-2022-23852Critical
Expat (aka libexpat) before 2.4.4 has a signed integer overflow in XML_GetBuffer, for configurations with a nonzero XML_CONTEXT_BYTES.
- CVE-2022-22824Critical
The defineAttribute function in xmlparse.c in Expat (libexpat) before 2.4.3 has an integer overflow. This may lead to incorrect behavior of the XML parser.
- CVE-2022-22823Critical
The build_model function in xmlparse.c in Expat (libexpat) before 2.4.3 has an integer overflow. This may lead to incorrect behavior of the XML parser.
- CVE-2022-22822Critical
addBinding in xmlparse.c in Expat (aka libexpat) before 2.4.3 has an integer overflow.
- CVE-2021-45960High
In Expat (libexpat) before 2.4.3, a left shift by 29 or more bits in the storeAtts function in xmlparse.c can lead to realloc misbehavior, such as allocating too few bytes or only freeing memory.
- CVE-2018-20843High
In libexpat (Expat before 2.2.7), XML input including XML names with a large number of colons could make the parser consume high amounts of RAM and CPU resources, enough for denial-of-service attacks.
- CVE-2016-4472High
The overflow protection in Expat is removed by compilers with certain optimization settings, allowing remote attackers to cause a denial of service (crash) or possibly execute arbitrary code via crafted XML data.
- CVE-2016-0718Critical
Expat allows context-dependent attackers to cause a denial of service (crash) or possibly execute arbitrary code via a malformed input document, which triggers a buffer overflow.
- CVE-2013-0340Medium
expat before version 2.4.0 does not properly handle entities expansion unless an application developer uses the XML_SetEntityDeclHandler function. This allows remote attackers to cause a denial of service (resource consumption), send HTTP requests to intranet servers, or read arbitrary files via a crafted XML document, aka an XML External Entity (XXE) issue.
- CVE-2009-3720Medium
The updatePosition function in libexpat (Expat 2.0.1) has a buffer over-read vulnerability. Crafted UTF-8 sequences in an XML document can cause an application crash.
- CVE-2026-93990High
Expat before 2.8.5 fails to validate that a high surrogate in UTF-16 input is followed by a low surrogate, allowing malformed UTF-16 sequences to be accepted. Attackers can supply UTF-16 encoded XML containing lone high surrogates that consume the following code unit, causing Expat to pass unpaired surrogates to applications built with XML_UNICODE and to silently replace input characters in other builds.
- CVE-2026-76641High
Expat through 2.8.3 contains an out-of-bounds read vulnerability that allows attackers to trigger memory corruption by processing XML with external entity parsers created via XML_ExternalEntityParserCreate. A struct size mismatch between ELEMENT_TYPE members causes storeAtts to read the attIndex member past allocated memory boundaries, resulting in failure to normalize whitespace in non-CDATA attributes or a wild pointer dereference causing a segfault. This vulnerability was introduced by the fix for CVE-2026-66046.
- CVE-2026-66046High
Denial of service vulnerability in Expat through 2.8.3. The storeAtts() function in xmlparse.c has quadratic complexity, causing excessive CPU consumption when processing an XML document with many attributes with non-normalized values.
- CVE-2022-25313Medium
In Expat (also known as libexpat) before 2.4.5, an attacker can trigger stack exhaustion in build_model via a large nesting depth in the DTD element.
- CVE-2022-22827High
In Expat (libexpat) before 2.4.3, the storeAtts function in xmlparse.c has an integer overflow. This may lead to incorrect parser behavior when processing specially crafted XML documents.
- CVE-2022-22826High
In Expat (libexpat) before 2.4.3, the nextScaffoldPart function in xmlparse.c has an integer overflow. This may lead to incorrect parser behavior when processing specially crafted XML documents.
- CVE-2022-22825High
In Expat (libexpat) before 2.4.3, the lookup function in xmlparse.c has an integer overflow. This may lead to incorrect parser behavior when processing specially crafted XML documents.
- CVE-2021-46143High
In doProlog in xmlparse.c in Expat (libexpat) before 2.4.3, an integer overflow exists for m_groupSize. This may lead to improper XML parser behavior.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

