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.
CVSS Details
- CVSS 3.0 Base Score: 7.5
- CVSS 3.0 Vector: (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Debian | debian-upgrade-libxml2 | Aug 23, 2017 | May 18, 2017 | |
| Freebsd | freebsd-upgrade-package-libxml2 | Dec 14, 2017 | Dec 13, 2017 | |
| Gentoo Linux | gentoo-linux-upgrade-dev-libs-libxml2 | Nov 13, 2017 | May 18, 2017 | |
| Huawei Euleros 2_0_sp1 | huawei-euleros-2_0_sp1-upgrade-libxml2huawei-euleros-2_0_sp1-upgrade-libxml2-develhuawei-euleros-2_0_sp1-upgrade-libxml2-python | Nov 30, 2017 | May 18, 2017 | |
| Huawei Euleros 2_0_sp2 | huawei-euleros-2_0_sp2-upgrade-libxml2huawei-euleros-2_0_sp2-upgrade-libxml2-develhuawei-euleros-2_0_sp2-upgrade-libxml2-python | Nov 30, 2017 | May 18, 2017 | |
| Oracle Solaris | oracle-solaris-11-3-upgrade-library-libxml2-2-9-5-0-175-3-27-0-1-0oracle-solaris-11-3-upgrade-library-python-libxml2-27-2-9-5-0-175-3-27-0-1-0oracle-solaris-11-3-upgrade-library-python-libxml2-34-2-9-5-0-175-3-27-0-1-0 | Jan 19, 2021 | May 18, 2017 | |
| Redhat_linux | — | no-fix-redhat-rpm-package | Jul 9, 2025 | May 15, 2017 |
| Suse | — | suse-upgrade-libxml2suse-upgrade-libxml2-2suse-upgrade-libxml2-2-32bitsuse-upgrade-libxml2-32bitsuse-upgrade-libxml2-develsuse-upgrade-libxml2-devel-32bitsuse-upgrade-libxml2-docsuse-upgrade-libxml2-pythonsuse-upgrade-libxml2-toolssuse-upgrade-libxml2-x86suse-upgrade-python-libxml2suse-upgrade-python2-libxml2-pythonsuse-upgrade-python3-libxml2-pythonsuse-upgrade-sles12-docker-imagesuse-upgrade-sles12sp1-docker-imagesuse-upgrade-sles12sp2-docker-image | May 31, 2017 | May 18, 2017 |
| Ubuntu | ubuntu-upgrade-libxml2 | Sep 19, 2017 | May 18, 2017 |
Prioritise with Active Threat Intelligence
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