Every CVE Search/ Get API key

CVE-2017-8872

The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a...

9.1 CriticalFix available

The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
None
Availability
High

Exploit likelihood

2.31%Up 1.5 points since Apr 14, 2021
90%50%10%1%

What each source reports

CVE List 9.1

The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure.

Record
CVE-2017-8872
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Weakness
CWE-125
Updated
2026-11-02
EUVDEUVD-2017-17814 9.1

The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure.

Record
EUVD-2017-17814
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-8hvw-m45w-cr5x 9.1

The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a...

The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure.

Record
GHSA-8hvw-m45w-cr5x
CVSS 3.0
9.1 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Weakness
CWE-125
Updated
2026-11-02
NVD 9.1

The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure.

Record
CVE-2017-8872
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
CVSS 3.0
9.1 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
CVSS 2.0
6.4 MediumAV:N/AC:L/Au:N/C:P/I:N/A:P
Weakness
CWE-125
Updated
2026-11-02
OSV 9.1

The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure.

Record
CVE-2017-8872
CVSS 3.0
9.1 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2017-8872 9.1

The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure.

Record
DEBIAN-CVE-2017-8872
CVSS 3.0
9.1 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Updated
2026-11-02
Show 8 moreShow less
OSVUBUNTU-CVE-2017-8872 9.1

The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure.

Record
UBUNTU-CVE-2017-8872
CVSS 3.1
9.1 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
CVSS 3.0
9.1 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Updated
2026-11-02
OSVCLSA-2021-1640700669 No score

Fixed 8 CVEs in libxml2

  • CVE-2021-3517.patch: validate UTF8 in xmlEncodeEntities
  • CVE-2021-3518.patch: fix user-after-free with 'xmllint --xinclude --dropdtd'
  • CVE-2021-3537.patch: propagate error in xmlParseElementChildrenContentDeclPriv
  • CVE-2021-3541.patch: parser fix for the billion laughs attack
  • CVE-2021-3516.patch: fix use-after-free with 'xmllint --html --push'
  • CVE-2017-8872.patch: free input buffer in xmlHaltParser
  • CVE-2019-20388.patch: fix memory leak in xmlSchemaValidateStream
  • CVE-2020-24977.patch: fix out-of-bounds read with 'xmllint --htmlout'
Record
CLSA-2021-1640700669
Updated
2026-11-02
OSVCLSA-2021-1640700710 No score

Fix CVE(s): CVE-2021-3517, CVE-2021-3516, CVE-2020-24977, CVE-2021-3541, CVE-2021-3537, CVE-2021-3518, CVE-2019-20388, CVE-2017-8872

  • SECURITY UPDATE: Out-of-bounds array access
    • debian/patches/CVE-2021-3517.patch: Validate UTF8 in xmlEncodeEntities
    • CVE-2021-3517
  • SECURITY UPDATE: Use-after-free error
    • debian/patches/CVE-2021-3518.patch: Fix use-after-free with 'xmllint --xinclude --dropdtd'
    • CVE-2021-3518
  • SECURITY UPDATE: Null pointer dereference while parsing in recovery mode
    • debian/patches/CVE-2021-3537.patch: Propagate error in xmlParseElementChildrenContentDeclPriv
    • CVE-2021-3537
  • SECURITY UPDATE: Parser fix for the billion laugs attach
    • debian/patches/CVE-2021-3541.patch: Fix parameter entities expansion in xmlParserEntityCheck
    • CVE-2021-3541
  • SECURITY UPDATE: Miscalculation of available bytes when parsing
    • debian/patches/CVE-2017-8872.patch: Free input buffer in xmlHaltParser
    • CVE-2017-8872
  • SECURITY UPDATE: Memory leak
    • debian/patches/CVE-2019-20388.patch: Fix memory leak in xmlSchemaValidateStream
    • CVE-2019-20388
  • SECURITY UPDATE: Out-of-bounds array access
    • debian/patches/CVE-2020-24977.patch: Fix out-of-bounds read with 'xmllint --htmlout'
    • CVE-2020-24977
  • SECURITY UPDATE: Use-after-free error
    • debian/patches/CVE-2021-3516.patch: Fix use-after-free with 'xmllint --html --push'
    • CVE-2021-3516
Record
CLSA-2021-1640700710
Updated
2026-11-02
OSVCLSA-2022-1641903536 No score

Fix of 8 CVEs

  • CVE-2021-3517.patch: validate UTF8 in xmlEncodeEntities
  • CVE-2021-3518.patch: fix user-after-free with 'xmllint --xinclude --dropdtd'
  • CVE-2021-3537.patch: propagate error in xmlParseElementChildrenContentDeclPriv
  • CVE-2021-3541.patch: parser fix for the billion laughs attack
  • CVE-2021-3516.patch: fix use-after-free with 'xmllint --html --push'
  • CVE-2017-8872.patch: free input buffer in xmlHaltParser
  • CVE-2019-20388.patch: fix memory leak in xmlSchemaValidateStream
  • CVE-2020-24977.patch: fix out-of-bounds read with 'xmllint --htmlout'
Record
CLSA-2022-1641903536
Updated
2026-11-02
OSVCLSA-2024-1708417192 No score

libxml2: Fix of 3 CVEs

  • CVE-2017-7375: add validation for parsed entity references
  • CVE-2017-7376: fix buffer overflow in URL handling
  • CVE-2017-8872: free input buffer in xmlHaltParser
Record
CLSA-2024-1708417192
Updated
2026-11-02
OSVSUSE-SU-2017:2115-1 No score

Security update for libxml2

This update for libxml2 fixes the following issues:

  • CVE-2017-8872: Out-of-bounds read could lead to application crash (bsc#1038444)
Record
SUSE-SU-2017:2115-1
Updated
2026-11-02
OSVSUSE-SU-2017:2141-1 No score

Security update for libxml2

This update for libxml2 fixes the following issues:

Security issues fixed:

  • CVE-2017-8872: Out-of-bounds read in htmlParseTryOrFinish. (bsc#1038444)
Record
SUSE-SU-2017:2141-1
Updated
2026-11-02
OSVUSN-4991-1 No score

libxml2 vulnerabilities

Yunho Kim discovered that libxml2 incorrectly handled certain error conditions. A remote attacker could exploit this with a crafted XML file to cause a denial of service, or possibly cause libxml2 to expose sensitive information. This issue only affected Ubuntu 14.04 ESM, and Ubuntu 16.04 ESM. (CVE-2017-8872)

Zhipeng Xie discovered that libxml2 incorrectly handled certain XML schemas. A remote attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 14.04 ESM, Ubuntu 16.04 ESM, and Ubuntu 18.04 LTS. (CVE-2019-20388)

It was discovered that libxml2 incorrectly handled invalid UTF-8 input. A remote attacker could possibly exploit this with a crafted XML file to cause libxml2 to crash, resulting in a denial of service. This issue only affected Ubuntu 14.04 ESM, Ubuntu 16.04 ESM, Ubuntu 18.04 LTS, Ubuntu 20.04 LTS and Ubuntu 20.10. (CVE-2020-24977)

It was discovered that libxml2 incorrectly handled invalid UTF-8 input. A remote attacker could possibly exploit this with a crafted XML file to cause libxml2 to crash, resulting in a denial of service. (CVE-2021-3517)

It was discovered that libxml2 did not properly handle certain crafted XML files. A local attacker could exploit this with a crafted input to cause libxml2 to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2021-3516, CVE-2021-3518)

It was discovered that libxml2 incorrectly handled error states. A remote attacker could exploit this with a crafted XML file to cause libxml2 to crash, resulting in a denial of service. (CVE-2021-3537)

Sebastian Pipping discovered that libxml2 did not properly handle certain crafted XML files. A remote attacker could exploit this with a crafted XML file to cause libxml2 to crash, resulting in a denial of service. This issue only affected Ubuntu 20.04 LTS, Ubuntu 20.10, and Ubuntu 21.04. (CVE-2021-3541)

Record
USN-4991-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
libxml2
TuxCare:OracleLinux:6
before 2.7.6-21.0.1.el6_8.1.tuxcare.ol.els1
2.7.6-21.0.1.el6_8.1.tuxcare.ol.els1
libxml2-devel
TuxCare:OracleLinux:6
before 2.7.6-21.0.1.el6_8.1.tuxcare.ol.els1
2.7.6-21.0.1.el6_8.1.tuxcare.ol.els1
libxml2-python
TuxCare:OracleLinux:6
before 2.7.6-21.0.1.el6_8.1.tuxcare.ol.els1
2.7.6-21.0.1.el6_8.1.tuxcare.ol.els1
libxml2-static
TuxCare:OracleLinux:6
before 2.7.6-21.0.1.el6_8.1.tuxcare.ol.els1
2.7.6-21.0.1.el6_8.1.tuxcare.ol.els1
libxml2
TuxCare:Ubuntu:16.04
before 2.9.3+dfsg1-1ubuntu0.7+tuxcare.els1
2.9.3+dfsg1-1ubuntu0.7+tuxcare.els1
libxml2-dev
TuxCare:Ubuntu:16.04
before 2.9.3+dfsg1-1ubuntu0.7+tuxcare.els1
2.9.3+dfsg1-1ubuntu0.7+tuxcare.els1
libxml2-doc
TuxCare:Ubuntu:16.04
before 2.9.3+dfsg1-1ubuntu0.7+tuxcare.els1
2.9.3+dfsg1-1ubuntu0.7+tuxcare.els1
libxml2-utils
TuxCare:Ubuntu:16.04
before 2.9.3+dfsg1-1ubuntu0.7+tuxcare.els1
2.9.3+dfsg1-1ubuntu0.7+tuxcare.els1
python-libxml2
TuxCare:Ubuntu:16.04
before 2.9.3+dfsg1-1ubuntu0.7+tuxcare.els1
2.9.3+dfsg1-1ubuntu0.7+tuxcare.els1
libxml2
TuxCare:CentOS:6
before 2.7.6-21.el6_8.1.tuxcare.els1
2.7.6-21.el6_8.1.tuxcare.els1
Show 37 moreShow less
Affected packages
PackageAffectedFixed
libxml2-devel
TuxCare:CentOS:6
before 2.7.6-21.el6_8.1.tuxcare.els1
2.7.6-21.el6_8.1.tuxcare.els1
libxml2-python
TuxCare:CentOS:6
before 2.7.6-21.el6_8.1.tuxcare.els1
2.7.6-21.el6_8.1.tuxcare.els1
libxml2-static
TuxCare:CentOS:6
before 2.7.6-21.el6_8.1.tuxcare.els1
2.7.6-21.el6_8.1.tuxcare.els1
libxml2
TuxCare:CentOS:7
before 2.9.1-6.el7_9.6.tuxcare.els3
2.9.1-6.el7_9.6.tuxcare.els3
libxml2-devel
TuxCare:CentOS:7
before 2.9.1-6.el7_9.6.tuxcare.els3
2.9.1-6.el7_9.6.tuxcare.els3
libxml2-python
TuxCare:CentOS:7
before 2.9.1-6.el7_9.6.tuxcare.els3
2.9.1-6.el7_9.6.tuxcare.els3
libxml2-static
TuxCare:CentOS:7
before 2.9.1-6.el7_9.6.tuxcare.els3
2.9.1-6.el7_9.6.tuxcare.els3
libxml2
Debian:12
before 2.9.4+dfsg1-6.1
2.9.4+dfsg1-6.1
libxml2
Debian:13
before 2.9.4+dfsg1-6.1
2.9.4+dfsg1-6.1
libxml2
Debian:14
before 2.9.4+dfsg1-6.1
2.9.4+dfsg1-6.1
libxml2
Debian:9
before 2.9.4+dfsg1-2.2+deb9u3, plus listed versions
2.9.4+dfsg1-2.22.9.4+dfsg1-2.2+deb9u12.9.4+dfsg1-2.2+deb9u2
2.9.4+dfsg1-2.2+deb9u3
libxml2
SUSE:Linux Enterprise Software Development Kit 11 SP4
before 2.7.6-0.77.3.2
2.7.6-0.77.3.2
libxml2
SUSE:Linux Enterprise Server 11 SP4
before 2.7.6-0.77.3.2
2.7.6-0.77.3.2
libxml2-python
SUSE:Linux Enterprise Server 11 SP4
before 2.7.6-0.77.3.5
2.7.6-0.77.3.5
libxml2
SUSE:Linux Enterprise Server for SAP Applications 11 SP4
before 2.7.6-0.77.3.2
2.7.6-0.77.3.2
libxml2-python
SUSE:Linux Enterprise Server for SAP Applications 11 SP4
before 2.7.6-0.77.3.5
2.7.6-0.77.3.5
libxml2
SUSE:Linux Enterprise Desktop 12 SP2
before 2.9.4-46.3.2
2.9.4-46.3.2
python-libxml2
SUSE:Linux Enterprise Desktop 12 SP2
before 2.9.4-46.3.2
2.9.4-46.3.2
libxml2
SUSE:Linux Enterprise Desktop 12 SP3
before 2.9.4-46.3.2
2.9.4-46.3.2
python-libxml2
SUSE:Linux Enterprise Desktop 12 SP3
before 2.9.4-46.3.2
2.9.4-46.3.2
libxml2
SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2
before 2.9.4-46.3.2
2.9.4-46.3.2
python-libxml2
SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2
before 2.9.4-46.3.2
2.9.4-46.3.2
libxml2
SUSE:Linux Enterprise Software Development Kit 12 SP2
before 2.9.4-46.3.2
2.9.4-46.3.2
libxml2
SUSE:Linux Enterprise Software Development Kit 12 SP3
before 2.9.4-46.3.2
2.9.4-46.3.2
libxml2
SUSE:Linux Enterprise Server 12 SP2
before 2.9.4-46.3.2
2.9.4-46.3.2
python-libxml2
SUSE:Linux Enterprise Server 12 SP2
before 2.9.4-46.3.2
2.9.4-46.3.2
libxml2
SUSE:Linux Enterprise Server for SAP Applications 12 SP2
before 2.9.4-46.3.2
2.9.4-46.3.2
python-libxml2
SUSE:Linux Enterprise Server for SAP Applications 12 SP2
before 2.9.4-46.3.2
2.9.4-46.3.2
libxml2
SUSE:Linux Enterprise Server 12 SP3
before 2.9.4-46.3.2
2.9.4-46.3.2
python-libxml2
SUSE:Linux Enterprise Server 12 SP3
before 2.9.4-46.3.2
2.9.4-46.3.2
libxml2
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
before 2.9.4-46.3.2
2.9.4-46.3.2
python-libxml2
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
before 2.9.4-46.3.2
2.9.4-46.3.2
libxml2
Ubuntu:Pro:14.04:LTS
before 2.9.1+dfsg1-3ubuntu4.13+esm2, plus listed versions
2.9.1+dfsg1-3ubuntu22.9.1+dfsg1-3ubuntu32.9.1+dfsg1-3ubuntu42.9.1+dfsg1-3ubuntu4.12.9.1+dfsg1-3ubuntu4.2
Show 12 moreShow less
2.9.1+dfsg1-3ubuntu4.32.9.1+dfsg1-3ubuntu4.42.9.1+dfsg1-3ubuntu4.52.9.1+dfsg1-3ubuntu4.62.9.1+dfsg1-3ubuntu4.72.9.1+dfsg1-3ubuntu4.82.9.1+dfsg1-3ubuntu4.92.9.1+dfsg1-3ubuntu4.102.9.1+dfsg1-3ubuntu4.112.9.1+dfsg1-3ubuntu4.122.9.1+dfsg1-3ubuntu4.132.9.1+dfsg1-3ubuntu4.13+esm1
2.9.1+dfsg1-3ubuntu4.13+esm2
libxml2
Ubuntu:Pro:16.04:LTS
before 2.9.3+dfsg1-1ubuntu0.7+esm1, plus listed versions
2.9.2+zdfsg1-42.9.2+zdfsg1-4ubuntu12.9.2+zdfsg1-4ubuntu22.9.2+zdfsg1-4ubuntu32.9.3+dfsg1-1
Show 7 moreShow less
2.9.3+dfsg1-1ubuntu0.12.9.3+dfsg1-1ubuntu0.22.9.3+dfsg1-1ubuntu0.32.9.3+dfsg1-1ubuntu0.42.9.3+dfsg1-1ubuntu0.52.9.3+dfsg1-1ubuntu0.62.9.3+dfsg1-1ubuntu0.7
2.9.3+dfsg1-1ubuntu0.7+esm1
libxml2
Ubuntu:18.04:LTS
before 2.9.4+dfsg1-6.1ubuntu1, plus listed versions
2.9.4+dfsg1-4ubuntu12.9.4+dfsg1-5ubuntu12.9.4+dfsg1-5ubuntu22.9.4+dfsg1-5.1ubuntu12.9.4+dfsg1-5.2ubuntu1
2.9.4+dfsg1-6.1ubuntu1
libxml2
Ubuntu:18.04:LTS
before 2.9.4+dfsg1-6.1ubuntu1.4, plus listed versions
2.9.4+dfsg1-4ubuntu12.9.4+dfsg1-5ubuntu12.9.4+dfsg1-5ubuntu22.9.4+dfsg1-5.1ubuntu12.9.4+dfsg1-5.2ubuntu12.9.4+dfsg1-6.1ubuntu12.9.4+dfsg1-6.1ubuntu1.22.9.4+dfsg1-6.1ubuntu1.3
2.9.4+dfsg1-6.1ubuntu1.4
libxml2
Ubuntu:20.04:LTS
before 2.9.10+dfsg-5ubuntu0.20.04.1, plus listed versions
2.9.4+dfsg1-7ubuntu32.9.4+dfsg1-7ubuntu52.9.4+dfsg1-8ubuntu12.9.4+dfsg1-8ubuntu22.9.4+dfsg1-8ubuntu32.9.10+dfsg-1ubuntu32.9.10+dfsg-4build12.9.10+dfsg-5
2.9.10+dfsg-5ubuntu0.20.04.1

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2017-8872 is a critical vulnerability (CVSS 9.1) in Xmlsoft Libxml2, published May 10, 2017. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.31%, the 83rd percentile. Fixed in libxml2 2.7.6-21.0.1.el6_8.1.tuxcare.ol.els1.

References

Show 17 moreShow less
MoveEnter Open