libexpat vulnerabilities
28 known CVE vulnerabilities in libexpat, translated and rated.
- CVE-2024-45490High
An issue was discovered in libexpat before 2.6.3, where xmlparse.c does not reject a negative length for XML_ParseBuffer.
- CVE-2017-11742High
The writeRandomBytes_RtlGenRandom function in xmlparse.c in libexpat versions 2.2.1 and 2.2.2 on Windows allows local users to gain privileges via a Trojan horse ADVAPI32.DLL in the current working directory due to an untrusted search path, known as DLL hijacking.
- CVE-2017-9233High
XML External Entity vulnerability in libexpat 2.2.0 and earlier allows attackers to put the parser in an infinite loop using a malformed external entity definition from an external DTD.
- CVE-2024-50602Medium
Issue in libexpat before version 2.6.4. The XML_ResumeParser function can crash if XML_StopParser stops/suspends an unstarted parser.
- CVE-2024-45492Critical
An issue was discovered in libexpat before version 2.6.3, which can lead to an integer overflow in the nextScaffoldPart function in xmlparse.c on 32-bit platforms.
- CVE-2024-45491Critical
An issue was discovered in libexpat before version 2.6.3 related to integer overflow in the dtdCopy function in xmlparse.c. This issue occurs on 32-bit platforms where UINT_MAX equals SIZE_MAX.
- CVE-2026-76957Medium
libexpat before 2.8.4 lacks handler call depth tracking with custom encoding callbacks. Thus, a use-after-free can occur. NOTE: this is similar to CVE-2026-50219, CVE-2026-56131 and CVE-2026-56412.
- CVE-2026-76956Medium
In libexpat versions 2.8.2 and 2.8.3 before 2.8.4, misinterpretation of getentropy's return code leads to insufficient entropy, making it vulnerable to hash flooding attacks, causing denial of service via crafted XML content.
- CVE-2026-72522Medium
libexpat before 2.8.3 has an out-of-bounds read and resultant infinite loop because low surrogates are treated the same as high surrogates during Unicode processing in the *_toUtf16 functions.
- CVE-2026-56412Medium
In libexpat before version 2.8.2, XML_TOK_DATA_CHARS is not considered in doCdataSection, leading to a lack of handler call depth tracking in cases of policy violation. This can result in a use-after-free error.
- CVE-2026-56411Medium
In libexpat before version 2.8.2, there is an integer overflow in the xmlwf function that can occur when processing NOTATION declarations in endDoctypeDecl.
- CVE-2026-56410Medium
In libexpat before version 2.8.2, there is an integer overflow in the resolveSystemId function, which may lead to unexpected application behavior.
- CVE-2026-56409Medium
In libexpat before version 2.8.2, there is an integer overflow for the output filename when the -d outputDir option is used.
- CVE-2026-56408Medium
libexpat before version 2.8.2 has an integer overflow in the copyString function.
- CVE-2026-56407Medium
In libexpat before version 2.8.2, there is an integer overflow in the doProlog function related to storeEntityValue and entity textLen.
- CVE-2026-56406Medium
In libexpat before version 2.8.2, there is an integer overflow in XML_ParseBuffer due to a lack of a check that was present in XML_Parse.
- CVE-2026-56405Medium
libexpat before version 2.8.2 has an integer overflow in the getAttributeId function.
- CVE-2026-56404Medium
libexpat before 2.8.2 has an integer overflow in addBinding.
- CVE-2026-56403Medium
libexpat before 2.8.2 has an integer overflow in storeAtts.
- CVE-2026-56132Medium
In libexpat before version 2.8.2, there is a heap-based buffer overflow in the doProlog function in xmlparse.c. This issue arises from mishandling of scaffold backing array reallocation when there is data-structure sharing across parsers.
- CVE-2026-56131Medium
libexpat before 2.8.2 lacks handler call depth tracking for calls to XML_ResumeParser from within handlers in cases of a policy violation. This can lead to a use-after-free situation.
- CVE-2026-50219Medium
libexpat before 2.8.2 lacks handler call depth tracking for calls to XML_GetBuffer, XML_Parse, XML_ParseBuffer, XML_ParserFree, or XML_ParserReset from within handlers in cases of a policy violation. Thus, a use-after-free can occur.
- CVE-2026-45186Low
In libexpat before version 2.8.1, the computational complexity of attribute name collision checks allows a denial of service via moderately sized crafted XML input.
- CVE-2026-41080Low
The vulnerability in libexpat before version 2.8.0 is due to insufficient entropy, allowing a hash flooding attack via a crafted XML document.
- CVE-2026-32778Low
In libexpat before version 2.7.5, a NULL pointer dereference occurs in the setContext function on retry after a previous out-of-memory condition.
- CVE-2026-32777Medium
The libexpat library before version 2.7.5 contains a vulnerability that causes an infinite loop while parsing DTD content. An attacker can provide specially crafted input, leading to application hang.
- CVE-2026-32776Medium
In libexpat before version 2.7.5, a NULL pointer dereference vulnerability exists when processing empty external parameter entity content. This can cause a crash in applications using this library.
- CVE-2024-8176High
A stack overflow vulnerability exists in the libexpat library due to unbounded recursion when handling nested entity references in XML documents. An attacker can craft a malicious XML file that exhausts stack space, causing a crash.

