Skip to content
OpenAdvisories
High · 7.5 CVE-2017-9048 EUVD-2017-17988GHSA-rf96-7wvx-58w8

libxml2 20904-GITv2.9.4-16-g0741801 is vulnerable to a stack-based buffer overflow. The function xmlSnprintfElementContent in valid.c is su…

Published May 18, 2017 · Updated Oct 14, 2026 · Assigned by mitre

Description

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libxml2 2.9.4+dfsg1-3.1 —
Debian 13 libxml2 2.9.4+dfsg1-3.1 —
Debian 12 libxml2 2.9.4+dfsg1-3.1 —
Debian 9 libxml2 2.9.4+dfsg1-2.2+deb9u1 DSA-3952-1
Debian 8 libxml2 2.9.1+dfsg1-5+deb8u5 DSA-3952-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Debian 7 libxml2 2.8.0+dfsg1-7+wheezy8 DLA-1008-1
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS libxml2 2.9.3+dfsg1-1ubuntu0.3 USN-3424-1
Ubuntu 14.04 LTS libxml2 2.9.1+dfsg1-3ubuntu4.10 USN-3424-1
ReleasePackageFixed inAdvisory
SLES 12 SP2 libxml2 +1 2.9.4-36.1 SUSE-SU-2017:1538-1, SUSE-SU-2017:1454-1
SLES 12 SP1 libxml2 +1 2.9.1-26.15.1 SUSE-SU-2017:1587-1
SLES 12 libxml2 +1 2.9.1-26.15.1 SUSE-SU-2017:1587-1
SLES 11 SP4 libxml2 2.7.6-0.69.1 SUSE-SU-2017:1557-1
SLES 11 SP4 libxml2-python 2.7.6-0.69.3 SUSE-SU-2017:1557-1
SLES 11 SP3 libxml2 2.7.6-0.69.1 SUSE-SU-2017:1557-1
SLES 11 SP3 libxml2-python 2.7.6-0.69.3 SUSE-SU-2017:1557-1
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 12 SP2 libxml2 +1 2.9.4-36.1 SUSE-SU-2017:1538-1, SUSE-SU-2017:1454-1
SLES for SAP 12 SP1 libxml2 +1 2.9.1-26.15.1 SUSE-SU-2017:1587-1
SLES for SAP 12 libxml2 +1 2.9.1-26.15.1 SUSE-SU-2017:1587-1
SLES for SAP 11 SP4 libxml2 2.7.6-0.69.1 SUSE-SU-2017:1557-1
SLES for SAP 11 SP4 libxml2-python 2.7.6-0.69.3 SUSE-SU-2017:1557-1
SUSE Linux Enterprise Point of Sale 11 SP3 libxml2 2.7.6-0.69.1 SUSE-SU-2017:1557-1
SUSE Linux Enterprise Point of Sale 11 SP3 libxml2-python 2.7.6-0.69.3 SUSE-SU-2017:1557-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed libxml2 2.9.12-1.2 openSUSE-SU-2024:11016-1

Advisories 12

References