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.
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Debian | — | Upgrade libxml2 | Aug 23, 2017 | May 18, 2017 |
| Freebsd | — | Upgrade libxml2 | Dec 14, 2017 | Dec 13, 2017 |
| Gentoo Linux | — | Upgrade dev-libs/libxml2. | Nov 13, 2017 | May 18, 2017 |
| Huawei Euleros 2_0_sp1 | — | Upgrade libxml2-develUpgrade libxml2-pythonUpgrade libxml2 | Nov 30, 2017 | May 18, 2017 |
| Huawei Euleros 2_0_sp2 | — | Upgrade libxml2-pythonUpgrade libxml2Upgrade libxml2-devel | Nov 30, 2017 | May 18, 2017 |
| Ibm Aix | — | — | Jun 5, 2025 | Jun 4, 2025 |
| Oracle Solaris | — | Upgrade library/python/libxml2-27 to version 2.9.5-0.175.3.27.0.1.0 on Solaris 11.3Upgrade library/libxml2 to version 2.9.5-0.175.3.27.0.1.0 on Solaris 11.3Upgrade library/python/libxml2-34 to version 2.9.5-0.175.3.27.0.1.0 on Solaris 11.3 | Jan 19, 2021 | May 18, 2017 |
| Redhat_linux | — | No solution exists | Jul 9, 2025 | May 15, 2017 |
| Suse | — | Upgrade libxml2-pythonUpgrade libxml2-32bitUpgrade libxml2-docUpgrade libxml2-toolsUpgrade libxml2-2-32bitUpgrade python2-libxml2-pythonUpgrade python3-libxml2-pythonUpgrade python-libxml2Upgrade sles12sp2-docker-imageUpgrade libxml2-develUpgrade sles12sp1-docker-imageUpgrade sles12-docker-imageUpgrade libxml2Upgrade libxml2-x86Upgrade libxml2-2Upgrade libxml2-devel-32bit | May 31, 2017 | May 18, 2017 |
| Ubuntu | — | Upgrade libxml2 | Sep 19, 2017 | May 18, 2017 |
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub