// For flags

CVE-2017-9048

libxml2: Stack-based buffer overflow in function xmlSnprintfElementContent

Severity Score

7.5
*CVSS v3

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

1
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

libxml2 20904-GITv2.9.4-16-g0741801 is vulnerable to a stack-based buffer overflow. The function xmlSnprintfElementContent in valid.c is supposed to recursively dump the element content definition into a char buffer 'buf' of size 'size'. At the end of the routine, the function may strcat two more characters without checking whether the current strlen(buf) + 2 < size. This vulnerability causes programs that use libxml2, such as PHP, to crash.

En libxml2 versión 20904-GITv2.9.4-16-g0741801 es vulnerable a un desbordamiento de búfer en la región stack de la memoria. La función xmlSnprintfElementContent en el archivo valid.c debe volcar recursivamente la definición del contenido del elemento en un búfer de caracteres 'buf' de tamaño 'tamaño'. Al final de la rutina, la función puede representar dos caracteres más sin comprobar si el actual strlen(buf) + 2 es menor que size. Esta vulnerabilidad causa que los programas que usan libxml2, como PHP, se bloqueen.

Several vulnerabilities were discovered in libxml2, a library providing support to read, modify and write XML and HTML files. A remote attacker could provide a specially crafted XML or HTML file that, when processed by an application using libxml2, would cause a denial-of-service against the application, information leaks, or potentially, the execution of arbitrary code with the privileges of the user running the application. For the oldstable distribution (jessie), these problems have been fixed in version 2.9.1+dfsg1-5+deb8u5. For the stable distribution (stretch), these problems have been fixed in version 2.9.4+dfsg1-2.2+deb9u1. For the unstable distribution (sid), these problems have been fixed in version 2.9.4+dfsg1-3.1.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
None
Integrity
None
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2017-05-18 CVE Reserved
  • 2017-05-18 CVE Published
  • 2024-08-05 CVE Updated
  • 2024-08-05 First Exploit
  • 2025-08-17 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
  • CWE-121: Stack-based Buffer Overflow
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Xmlsoft
Search vendor "Xmlsoft"
Libxml2
Search vendor "Xmlsoft" for product "Libxml2"
2.9.4
Search vendor "Xmlsoft" for product "Libxml2" and version "2.9.4"
-
Affected