CVE-2017-9047: Buffer Overflow

Published 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 XMLELEMENTCONTENTELEMENT, 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.

Affected Software

3 affected componentsFixes available
debian/libxml2
2.9.4+dfsg1-7+deb10u42.9.4+dfsg1-7+deb10u62.9.10+dfsg-6.7+deb11u42.9.14+dfsg-1.3~deb12u12.9.14+dfsg-1.3
debian/libxml2<=2.9.4+dfsg1-2.2, <=2.9.1+dfsg1-5
2.9.4+dfsg1-3.12.9.4+dfsg1-2.2+deb9u12.9.1+dfsg1-5+deb8u5
XMLSoft Libxml2=2.9.4

Event History

May 18, 2017
CVE Published
via MITRE·06:13 AM
Data Sourced
via MITRE·06:13 AM
Description

Frequently Asked Questions

1

What is the severity of CVE-2017-9047?

CVE-2017-9047 has a severity score of 7.5, categorizing it as high severity.

2

How do I fix CVE-2017-9047?

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.

3

Which software is affected by CVE-2017-9047?

CVE-2017-9047 affects the libxml2 package, particularly versions 2.9.4 and earlier.

4

What type of vulnerability is CVE-2017-9047?

CVE-2017-9047 is a buffer overflow vulnerability found in the libxml2 library.

5

Is CVE-2017-9047 exploitable?

Yes, CVE-2017-9047 is exploitable and can lead to potential code execution risks if left unpatched.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203