libxml2: Buffer overflow in function xmlSnprintfElementContent
Published May 18, 2017
7.5
HIGHCVSS 3.0
EPSS 3.19%
Description
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.
Affected products
No data.
No data.
Red Hat JBoss Core Services
n/a
Fixed · RHSA-2018:2486
Red Hat Enterprise Linux 5
libxml2
Will not fix
Red Hat Enterprise Linux 6
libxml2
Will not fix
Red Hat Enterprise Linux 7
libxml2
Will not fix
Red Hat Enterprise Linux 8
libxml2
Not affected
Red Hat Enterprise Linux 8
mingw-libxml2
Affected
Red Hat JBoss Core Services
libxml2
Affected
Red Hat JBoss Enterprise Web Server 3
libxml2
Will not fix
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat JBoss Core Services | n/a | Fixed | RHSA-2018:2486 |
| Red Hat Enterprise Linux 5 | libxml2 | Will not fix | n/a |
| Red Hat Enterprise Linux 6 | libxml2 | Will not fix | n/a |
| Red Hat Enterprise Linux 7 | libxml2 | Will not fix | n/a |
| Red Hat Enterprise Linux 8 | libxml2 | Not affected | n/a |
| Red Hat Enterprise Linux 8 | mingw-libxml2 | Affected | n/a |
| Red Hat JBoss Core Services | libxml2 | Affected | n/a |
| Red Hat JBoss Enterprise Web Server 3 | libxml2 | Will not fix | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
This vulnerability exists in the DTD validation functionality of libxml2. Applications that do not attempt to validate untrusted documents are not impacted.
Metrics
No CVSS v4.0 score for this CVE.
No CVSS v3.1 score for this CVE.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
1 other source (Red Hat) ▾
CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
AV:N/AC:L/Au:N/C:N/I:N/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2021–2026- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (20 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 3.19% (0.03185) | 87.63th | v5 (v2026.06.15) |
| Jun 15, 2026 | 3.19% (0.03185) | 86.38th | v5 (v2026.06.15) |
| Nov 21, 2025 | 3.02% (0.03020) | 86.13th | v4 (v2025.03.14) |
| Nov 18, 2025 | 1.26% (0.01255) | 77.59th | v4 (v2025.03.14) |
| Jul 17, 2025 | 3.03% (0.03032) | 86.08th | v4 (v2025.03.14) |
| Jun 19, 2025 | 1.03% (0.01028) | 76.29th | v4 (v2025.03.14) |
| Jun 2, 2025 | 3.38% (0.03382) | 86.84th | v4 (v2025.03.14) |
| Jul 20, 2024 | 0.29% (0.00289) | 69.27th | v3 (v2023.03.01) |
| Feb 8, 2024 | 0.29% (0.00289) | 68.07th | v3 (v2023.03.01) |
| Mar 7, 2023 | 0.29% (0.00289) | 64.02th | v3 (v2023.03.01) |
| Mar 6, 2023 | 1.11% (0.01108) | 55.18th | v2 (v2022.01.01) |
| Sep 17, 2022 | 1.11% (0.01108) | 53.57th | v2 (v2022.01.01) |
| Apr 1, 2022 | 1.11% (0.01108) | 51.54th | v2 (v2022.01.01) |
| Feb 4, 2022 | 1.11% (0.01108) | 29.61th | v2 (v2022.01.01) |
| Feb 3, 2022 | 1.45% (0.01454) | 32.67th | v1 |
| Jan 6, 2022 | 1.45% (0.01454) | 31.96th | v1 |
| Sep 1, 2021 | 1.45% (0.01454) | 71.88th | v1 |
| Jun 30, 2021 | 1.45% (0.01454) | 0.00th | v1 |
| Jun 29, 2021 | 1.25% (0.01247) | 0.00th | v1 |
| Apr 14, 2021 | 1.04% (0.01040) | 0.00th | v1 |
References (10)
- http://www.debian.org/security/2017/dsa-3952 vendor-advisoryx_refsource_DEBIAN
- http://www.openwall.com/lists/oss-security/2017/05/15/1 x_refsource_MISCExploitMailing ListPatchThird Party Advisory
- http://www.securityfocus.com/bid/98599 vdb-entryx_refsource_BIDThird Party AdvisoryVDB Entry
- https://access.redhat.com/security/cve/CVE-2017-9047 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1452554 Issue Tracking
- https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E mailing-listx_refsource_MLIST
- https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E mailing-listx_refsource_MLIST
- https://nvd.nist.gov/vuln/detail/CVE-2017-9047
- https://security.gentoo.org/glsa/201711-01 vendor-advisoryx_refsource_GENTOO
- https://www.cve.org/CVERecord?id=CVE-2017-9047
| Link | Providers | Tags |
|---|---|---|
| http://www.debian.org/security/2017/dsa-3952 | vendor-advisoryx_refsource_DEBIAN | |
| http://www.openwall.com/lists/oss-security/2017/05/15/1 | x_refsource_MISCExploitMailing ListPatchThird Party Advisory | |
| http://www.securityfocus.com/bid/98599 | vdb-entryx_refsource_BIDThird Party AdvisoryVDB Entry | |
| https://access.redhat.com/security/cve/CVE-2017-9047 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=1452554 | Issue Tracking | |
| https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E | mailing-listx_refsource_MLIST | |
| https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E | mailing-listx_refsource_MLIST | |
| https://nvd.nist.gov/vuln/detail/CVE-2017-9047 | ||
| https://security.gentoo.org/glsa/201711-01 | vendor-advisoryx_refsource_GENTOO | |
| https://www.cve.org/CVERecord?id=CVE-2017-9047 |
Change history (0)
No recorded changes yet.