Sceawere
Vulnerability Detail
CVE-2026-86140UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
libxml2 Stack-Based Buffer Overflow
Vulnerability Metadata
- Severity
- High
- Score / CVSS
- 8
- Creation Date
- 1d ago
- Vendor
- xmlsoft
- Product
- libxml2
- Attack Type
- CWE-121 Stack-based Buffer Overflow
- Vector String
- CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
- Attack Complexity
- LOW
Narrative and Response
Description
In libxml2 before 2.15.4, xmlSnprintfElements in valid.c has a strcat stack-based buffer overflow.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "8.0",
"pubDate": "2026-09-05T05:17:12.877Z",
"pubdate": "2026-09-05T05:17:12.877Z",
"executiveSummary": "A stack-based buffer overflow vulnerability has been identified in libxml2 versions prior to 2.15.4, specifically within the xmlSnprintfElements function located in valid.c.\nThis vulnerability is triggered by an unsafe use of the strcat function during element string concatenation, which fails to perform adequate bounds checking on the destination stack buffer.\nThe flaw allows an attacker to cause memory corruption, potentially leading to arbitrary code execution or a denial-of-service condition through application crashes.\nThe vulnerability affects systems leveraging the libxml2 library for XML validation and document processing.\nSuccessful exploitation generally requires the processing of a maliciously crafted XML document designed to trigger the overflow during element validation routines.\nThe risk implication is high, as libxml2 is a widely utilized component in various software ecosystems, making it a critical security dependency.\nThere are no specific authentication or privilege requirements to trigger the vulnerability beyond the ability to supply input to the XML parser.",
"technicalDetails": "The root cause of this vulnerability is a stack-based buffer overflow occurring in the xmlSnprintfElements function within valid.c of the libxml2 library. This function is responsible for formatting XML element information for error reporting or diagnostic purposes. During the processing of elements, the implementation utilizes the strcat function to append strings into a fixed-size stack buffer without verifying if the resultant length exceeds the allocated memory segment.\nIn scenarios where an XML document contains deeply nested structures or an excessive number of elements that, when formatted, exceed the static buffer size defined in xmlSnprintfElements, the strcat call writes past the allocated stack memory. Because stack frames contain critical control data, including return addresses and saved frame pointers, an attacker can overwrite these segments with arbitrary data contained in the malicious input stream.\nThe attack flow initiates when an application using libxml2 parses an untrusted or maliciously crafted XML file. When the library invokes validation logic, control reaches the vulnerable xmlSnprintfElements routine. An attacker providing a specially crafted XML document with deep element hierarchies or long element names can force the concatenation routine to overflow the destination stack buffer. By carefully crafting the overflow payload, an attacker can manipulate the execution flow of the application upon the function's return.\nThis vulnerability is a classic buffer overflow where memory safety boundaries are violated. Because the buffer resides on the stack, the primary impact is the potential for local or remote code execution depending on the host application's architecture and the presence of exploit mitigations such as stack canaries, ASLR, or DEP/NX. In environments lacking these protections, the overflow can lead to immediate arbitrary code execution under the context of the user running the application. If code execution is not achieved, the resulting memory corruption will almost certainly cause a process crash, leading to a denial-of-service.\nThe vulnerability is present in all versions of libxml2 before 2.15.4. It is accessible through any interface that invokes the element validation routines of the library. No special authentication is required; the attacker merely needs the victim application to process the malformed XML data."
}