Libexpatproject Libexpat
Don't miss out!
Thousands of developers use stack.watch to stay informed.Get an email whenever new security vulnerabilities are reported in Libexpatproject Libexpat.
By the Year
In 2026 there have been 31 vulnerabilities in Libexpatproject Libexpat with an average score of 6.7 out of ten. Last year, in 2025 Libexpat had 2 security vulnerabilities published. That is, 29 more vulnerabilities have already been reported in 2026 as compared to last year. However, the average CVE base score of the vulnerabilities in 2026 is greater by 1.47.
| Year | Vulnerabilities | Average Score |
|---|---|---|
| 2026 | 31 | 6.67 |
| 2025 | 2 | 5.20 |
| 2024 | 7 | 7.26 |
| 2023 | 0 | 0.00 |
| 2022 | 17 | 8.76 |
| 2021 | 0 | 0.00 |
| 2020 | 0 | 0.00 |
| 2019 | 2 | 7.00 |
It may take a day or so for new Libexpat vulnerabilities to show up in the stats or in the list of recent security vulnerabilities. Additionally vulnerabilities may be tagged under a different product or component name.
Recent Libexpatproject Libexpat Security Vulnerabilities
libexpat xmlwf <=2.10.0 symlink follow vulnerability (file overwrite)
CVE-2026-128241
4.1 - Medium
- November 13, 2026
The xmlwf tool in libexpat through 2.10.0 contains a symlink following vulnerability because -d output mode opens files with fopen("wb"), which follows symbolic links. Local attackers with write access to the output directory can plant a symlink at the expected output name to truncate or overwrite files writable by the xmlwf user.
insecure temporary file
libexpat 2.10.0 OOB read in unknown_toUtf8/Utf16
CVE-2026-124317
6.3 - Medium
- November 07, 2026
libexpat through 2.10.0 contains an out-of-bounds read vulnerability in unknown_toUtf8() and unknown_toUtf16() in xmltok.c when handling application-registered unknown encodings. Attackers can supply a document ending in a truncated multibyte sequence so the convert callback reads past the parse buffer, leaking adjacent memory or crashing applications.
Buffer Over-read
libexpat 2.9.0 NULL ptr deref in externalEntityInitProcessor2()
CVE-2026-117610
8.2 - High
- October 28, 2026
libexpat through 2.9.0 contains a NULL pointer dereference vulnerability in externalEntityInitProcessor2() in lib/xmlparse.c that mishandles the XML_TOK_NONE token from empty input. Attackers who control stream chunking can force an empty non-final first parse on an external entity subparser, causing a later parse to crash the application.
NULL Pointer Dereference
libexpat <=2.9.0 Signed Integer Overflow in storeAtts() (OOB Write)
CVE-2026-118370
8.2 - High
- October 28, 2026
libexpat through 2.9.0 contains a signed integer overflow vulnerability in storeAtts() in lib/xmlparse.c that allows attackers to trigger out-of-bounds writes via oversized attribute counts. Attackers can supply a multi-gigabyte document with a start tag carrying over 2^30 attributes to overflow attIndex and nPrefixes, crashing applications or corrupting heap memory.
Integer Overflow or Wraparound
libexpat 2.7.2-2.9.0 DoS via XML_ParserReset
CVE-2026-113351
8.2 - High
- October 20, 2026
libexpat 2.7.2 through 2.9.0 contains a denial of service vulnerability because XML_ParserReset zeroes the direct byte count but never offsets tracked heap allocations. Attackers can submit a large XML document so later documents on the same reset parser fail with XML_ERROR_NO_MEMORY until it is recreated.
Missing Initialization of Resource
Heap Buffer Over-Read in libexpat XML_ParseBuffer (CVE-2026-77214)
CVE-2026-77214
8.3 - High
- October 07, 2026
libexpat before commit 13c5f63 contains a heap buffer over-read vulnerability in xmlparse.c. XML_ParseBuffer advances the parse buffer end with parser->m_bufferEnd += len using a caller-supplied length that is not validated against the allocated buffer size, so repeated XML_ParseBuffer calls move m_bufferEnd past the end of the heap allocation and subsequent parsing reads out of bounds. Reaching this path requires a parse buffer to already be present; otherwise XML_ParseBuffer returns XML_ERROR_NO_BUFFER. A buffer is present after a prior call to XML_GetBuffer, either directly (the common case) or indirectly through a prior XML_Parse call that allocates the buffer internally. The over-read discloses adjacent heap memory to the calling application, recovering heap pointers, libc function pointers, and code pointers sufficient to defeat ASLR and build further exploitation primitives.
Out-of-bounds Read
libexpat 2.7.22.8.5 Integer Overflow in expat_realloc()
CVE-2026-102633
8.2 - High
- September 29, 2026
libexpat versions 2.7.2 through 2.8.5 contain an integer overflow vulnerability in expat_realloc() function on 32-bit platforms when computing allocation sizes. Attackers supplying malicious XML to applications parsing with vulnerable libexpat can cause heap buffer overflow, memory corruption, or denial of service.
Integer Overflow or Wraparound
Expat 2.8.4 XML Parser UTF-16 Surrogate Validation Flaw (CVE-2026-93990)
CVE-2026-93990
8.7 - High
- September 19, 2026
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.
Improper Handling of Unicode Encoding
libexpat <=2.8.3 OOB Read via XML_ExternalEntityParserCreate
CVE-2026-76641
8.7 - High
- August 20, 2026
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.
Out-of-bounds Read
libexpat UA Free prior to 2.8.4 via custom encode callback
CVE-2026-76957
4.9 - Medium
- August 20, 2026
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.
Dangling pointer
libexpat <=2.8.3 Hash Flooding via Insufficient Entropy
CVE-2026-76956
5.9 - Medium
- August 20, 2026
In libexpat 2.8.2 and 2.8.3 before 2.8.4, misinterpretation of getentropy's return code leads to insufficient entropy, which results in being vulnerable to hash flooding attacks, causing a denial of service via crafted XML content.
Unexpected Status Code or Return Value
libexpat DoS via O(N^2) storeAtts() in XML parse (<2.8.3)
CVE-2026-66046
8.7 - High
- August 18, 2026
Expat through 2.8.3 contains a denial of service vulnerability caused by quadratic algorithmic complexity in the storeAtts() function in xmlparse.c, where processing N specified attributes with non-normalized values triggers an O(N^2) linear scan of elementType->defaultAtts to determine CDATA status. A remote unauthenticated attacker can supply a single well-formed XML document of a few megabytes to an application parsing untrusted XML to cause excessive CPU consumption, resulting in denial of service without requiring authentication, external entity resolution, or non-default parser options.
Inefficient Algorithmic Complexity
libexpat 2.8.3 OOB Read & Infinite Loop via UTF-16 Surrogates
CVE-2026-72522
6.2 - Medium
- August 10, 2026
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.
Out-of-bounds Read
libexpat <=2.8.2 Use-After-Free via XML_TOK_DATA_CHARS in doCdataSection
CVE-2026-56412
4.9 - Medium
- June 21, 2026
libexpat before 2.8.2 does not consider XML_TOK_DATA_CHARS in doCdataSection and thus lacks handler call depth tracking for various calls from within handlers in cases of a policy violation. Thus, a use-after-free can occur. NOTE: this issue exists because of an incomplete fix for CVE-2026-50219.
Dangling pointer
Integer Overflow in libexpat <2.8.2 via endDoctypeDecl (NOTATION)
CVE-2026-56411
6.9 - Medium
- June 21, 2026
xmlwf in libexpat before 2.8.2 has an integer overflow in endDoctypeDecl via NOTATION declarations.
Integer Overflow or Wraparound
Integer Overflow in libexpat (<2.8.2) ResolveSystemID
CVE-2026-56410
6.9 - Medium
- June 21, 2026
xmlwf in libexpat before 2.8.2 has an integer overflow in resolveSystemId.
Integer Overflow or Wraparound
Integer overflow in libexpat 2.8.2 XMLWF -d outputDir
CVE-2026-56409
6.5 - Medium
- June 21, 2026
xmlwf in libexpat before 2.8.2 has an integer overflow for the output filename when -d outputDir is used.
Integer Overflow or Wraparound
libexpat before 2.8.2 integer overflow in copyString
CVE-2026-56408
6.9 - Medium
- June 21, 2026
libexpat before 2.8.2 has an integer overflow in copyString.
Integer Overflow or Wraparound
libexpat 2.8.1 int overflow in doProlog
CVE-2026-56407
6.9 - Medium
- June 21, 2026
libexpat before 2.8.2 has an integer overflow in doProlog that is related to storeEntityValue and entity textLen.
Integer Overflow or Wraparound
INT OVERFLOW in libexpat <2.8.2 XML_ParseBuffer (2.8.2+ fixed)
CVE-2026-56406
6.9 - Medium
- June 21, 2026
libexpat before 2.8.2 has an integer overflow in XML_ParseBuffer because it lacked a check that was present in XML_Parse.
Integer Overflow or Wraparound
Integer Overflow in libexpat getAttributeId (v < 2.8.2)
CVE-2026-56405
6.9 - Medium
- June 21, 2026
libexpat before 2.8.2 has an integer overflow in getAttributeId.
Integer Overflow or Wraparound
libexpat <2.8.2 Integer Overflow in addBinding
CVE-2026-56404
6.9 - Medium
- June 21, 2026
libexpat before 2.8.2 has an integer overflow in addBinding.
Integer Overflow or Wraparound
Libexpat <2.8.2: Integer Overflow in storeAtts
CVE-2026-56403
6.9 - Medium
- June 21, 2026
libexpat before 2.8.2 has an integer overflow in storeAtts.
Integer Overflow or Wraparound
Heap-based Buffer Overflow in libexpat < 2.8.2 (xmlparse.c)
CVE-2026-56132
6.9 - Medium
- June 19, 2026
In libexpat before 2.8.2, there is a heap-based buffer overflow in doProlog in xmlparse.c because scaffold backing array reallocation is mishandled when there is data-structure sharing across parsers.
Incorrect Synchronization
libexpat Use-After-Free via XML_ResumeParser before v2.8.2
CVE-2026-56131
4.9 - Medium
- June 19, 2026
libexpat before 2.8.2 lacks handler call depth tracking for calls to XML_ResumeParser from within handlers in cases of a policy violation. Thus, a use-after-free can occur (similar to the CVE-2026-50219 situation).
Dangling pointer
Use-After-Free in libexpat <2.8.2 (XML handler recursion)
CVE-2026-50219
4.9 - Medium
- June 04, 2026
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,
Dangling pointer
Denial of Service via Attribute Name Collision in libexpat < 2.8.1
CVE-2026-45186
7.5 - High
- May 10, 2026
In libexpat before 2.8.1, the computational complexity of attribute name collision checks allows a denial of service via moderately sized crafted XML input.
Inefficient Algorithmic Complexity
libexpat <2.7.6 Hash Flooding via Crafted XML (Entropy Issue)
CVE-2026-41080
7.5 - High
- April 16, 2026
libexpat before 2.8.0 uses insufficient entropy, and thus hash flooding can occur via a crafted XML document.
Insufficient Entropy
NULL Pointer Deref in libexpat <2.7.5
CVE-2026-32776
4 - Medium
- March 16, 2026
libexpat before 2.7.5 allows a NULL pointer dereference with empty external parameter entity content.
NULL Pointer Dereference
Expat libexpat <2.7.4 Integer Overflow in doContent
CVE-2026-25210
6.9 - Medium
- January 30, 2026
In libexpat before 2.7.4, the doContent function does not properly determine the buffer size bufSize because there is no integer overflow check for tag buffer reallocation.
Integer Overflow or Wraparound
libexpat <2.7.4: XML_ExternalEntityParser Unknown Enc Handler Data Copy Issue
CVE-2026-24515
2.9 - Low
- January 23, 2026
In libexpat before 2.7.4, XML_ExternalEntityParserCreate does not copy unknown encoding handler user data.
NULL Pointer Dereference
Denial of Service via Oversized XML in libexpat <= 2.7.3 (CVE-2025-66382)
CVE-2025-66382
2.9 - Low
- November 28, 2025
In libexpat through 2.7.3, a crafted file with an approximate size of 2 MiB can lead to dozens of seconds of processing time.
Inefficient Algorithmic Complexity
Large Allocations in Expat <2.7.2 via Small XML (DoS)
CVE-2025-59375
7.5 - High
- September 15, 2025
libexpat in Expat before 2.7.2 allows attackers to trigger large dynamic memory allocations via a small document that is submitted for parsing.
Allocation of Resources Without Limits or Throttling
libexpat v<2.6.4 Crash via XML_ResumeParser due to XML_StopParser misuse
CVE-2024-50602
5.9 - Medium
- October 27, 2024
An issue was discovered in libexpat before 2.6.4. There is a crash within the XML_ResumeParser function because XML_StopParser can stop/suspend an unstarted parser.
Improper Check for Unusual or Exceptional Conditions
libexpat int-overflow on 32-bit (before 2.6.3)
CVE-2024-45492
7.3 - High
- August 30, 2024
An issue was discovered in libexpat before 2.6.3. nextScaffoldPart in xmlparse.c can have an integer overflow for m_groupSize on 32-bit platforms (where UINT_MAX equals SIZE_MAX).
Integer Overflow or Wraparound
Integer Overflow in libexpat dtdCopy (v<2.6.3) on 32-bit
CVE-2024-45491
7.3 - High
- August 30, 2024
An issue was discovered in libexpat before 2.6.3. dtdCopy in xmlparse.c can have an integer overflow for nDefaultAtts on 32-bit platforms (where UINT_MAX equals SIZE_MAX).
Integer Overflow or Wraparound
libexpat Negative XML_ParseBuffer Length Bypass Before 2.6.3
CVE-2024-45490
9.8 - Critical
- August 30, 2024
An issue was discovered in libexpat before 2.6.3. xmlparse.c does not reject a negative length for XML_ParseBuffer.
Integer Overflow or Wraparound
XML Entity Expansion in libexpat <2.6.1 via XML_ExternalEntityParserCreate
CVE-2024-28757
7.5 - High
- March 10, 2024
libexpat through 2.6.1 allows an XML Entity Expansion attack when there is isolated use of external parsers (created via XML_ExternalEntityParserCreate).
XEE
libexpat <=2.5.0 DoS via large token causing excessive reparsings
CVE-2023-52425
7.5 - High
- February 04, 2024
libexpat through 2.5.0 allows a denial of service (resource consumption) because many full reparsings are required in the case of a large token for which multiple buffer fills are needed.
Resource Exhaustion
Rec XML Entity Expansion in libexpat 2.5.0 (CVE-2023-52426)
CVE-2023-52426
5.5 - Medium
- February 04, 2024
libexpat through 2.5.0 allows recursive XML Entity Expansion if XML_DTD is undefined at compile time.
XEE
Use-After-Free in libexpat <= 2.4.9 via XML_ExternalEntityParserCreate
CVE-2022-43680
7.5 - High
- October 24, 2022
In libexpat through 2.4.9, there is a use-after free caused by overeager destruction of a shared DTD in XML_ExternalEntityParserCreate in out-of-memory situations.
Dangling pointer
libexpat <2.4.9 UAF in xmlparse.c
CVE-2022-40674
8.1 - High
- September 14, 2022
libexpat before 2.4.9 has a use-after-free in the doContent function in xmlparse.c.
Dangling pointer
In Expat (aka libexpat) before 2.4.5, an attacker can trigger stack exhaustion in build_model
CVE-2022-25313
6.5 - Medium
- February 18, 2022
In Expat (aka libexpat) before 2.4.5, an attacker can trigger stack exhaustion in build_model via a large nesting depth in the DTD element.
Stack Exhaustion
In Expat (aka libexpat) before 2.4.5
CVE-2022-25314
7.5 - High
- February 18, 2022
In Expat (aka libexpat) before 2.4.5, there is an integer overflow in copyString.
Integer Overflow or Wraparound
In Expat (aka libexpat) before 2.4.5
CVE-2022-25315
9.8 - Critical
- February 18, 2022
In Expat (aka libexpat) before 2.4.5, there is an integer overflow in storeRawNames.
Integer Overflow or Wraparound
xmltok_impl.c in Expat (aka libexpat) before 2.4.5 lacks certain validation of encoding
CVE-2022-25235
9.8 - Critical
- February 16, 2022
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.
Output Sanitization
xmlparse.c in Expat (aka libexpat) before 2.4.5
CVE-2022-25236
9.8 - Critical
- February 16, 2022
xmlparse.c in Expat (aka libexpat) before 2.4.5 allows attackers to insert namespace-separator characters into namespace URIs.
Exposure of Resource to Wrong Sphere
Expat (aka libexpat) before 2.4.4 has an integer overflow in the doProlog function.
CVE-2022-23990
7.5 - High
- January 26, 2022
Expat (aka libexpat) before 2.4.4 has an integer overflow in the doProlog function.
Integer Overflow or Wraparound
Expat (aka libexpat) before 2.4.4 has a signed integer overflow in XML_GetBuffer
CVE-2022-23852
9.8 - Critical
- January 24, 2022
Expat (aka libexpat) before 2.4.4 has a signed integer overflow in XML_GetBuffer, for configurations with a nonzero XML_CONTEXT_BYTES.
Integer Overflow or Wraparound
addBinding in xmlparse.c in Expat (aka libexpat) before 2.4.3 has an integer overflow.
CVE-2022-22822
9.8 - Critical
- January 10, 2022
addBinding in xmlparse.c in Expat (aka libexpat) before 2.4.3 has an integer overflow.
Integer Overflow or Wraparound
Stay on top of Security Vulnerabilities
Want an email whenever new vulnerabilities are published for Libexpatproject Libexpat or by Libexpatproject? Click the Watch button to subscribe.