First published: Thu May 18 2017(Updated: )
A buffer overflow was discovered in libxml2 20904-GITv2.9.4-16-g0741801. The function xmlSnprintfElementContent in valid.c is supposed to recursively dump the element content definition into a char buffer 'buf' of size 'size'. The variable len is assigned strlen(buf). If the content->type is XML_ELEMENT_CONTENT_ELEMENT, then (i) the content->prefix is appended to buf (if it actually fits) whereupon (ii) content->name is written to the buffer. However, the check for whether the content->name actually fits also uses 'len' rather than the updated buffer length strlen(buf). This allows us to write about "size" many bytes beyond the allocated memory. This vulnerability causes programs that use libxml2, such as PHP, to crash.
Credit: cve@mitre.org
Affected Software | Affected Version | How to fix |
---|---|---|
debian/libxml2 | <=2.9.4+dfsg1-2.2<=2.9.1+dfsg1-5 | 2.9.4+dfsg1-3.1 2.9.4+dfsg1-2.2+deb9u1 2.9.1+dfsg1-5+deb8u5 |
debian/libxml2 | 2.9.4+dfsg1-7+deb10u4 2.9.4+dfsg1-7+deb10u6 2.9.10+dfsg-6.7+deb11u4 2.9.14+dfsg-1.3~deb12u1 2.9.14+dfsg-1.3 | |
Xmlsoft Libxml2 | =2.9.4 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2017-9047 has a severity score of 7.5, categorizing it as high severity.
To fix CVE-2017-9047, update libxml2 to one of the patched versions such as 2.9.4+dfsg1-3.1 or 2.9.14+dfsg-1.3.
CVE-2017-9047 affects the libxml2 package, particularly versions 2.9.4 and earlier.
CVE-2017-9047 is a buffer overflow vulnerability found in the libxml2 library.
Yes, CVE-2017-9047 is exploitable and can lead to potential code execution risks if left unpatched.