VDB

CVE-2017-9047

CVE-2017-9047 PUBLISHED CVSS 7.5 HIGH

Reported by mitre · Published May 18, 2017

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
SIMATIC S7-1500 CPU 1518F-4 PN/DP MFPSiemens3.1.5
SIPLUS S7-1500 CPU 1518-4 PN/DP MFPSiemens3.1.5
libxml2Ubuntu:14.04:LTS2.9.1+dfsg1-3ubuntu4.10
libxml2Ubuntu:16.04:LTS2.9.3+dfsg1-1ubuntu0.3

Risk scores

CVSS 3.0
7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected products

VendorProductVersions
n/an/an/a
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP3.1.0
SiemensSIPLUS S7-1500 CPU 1518-4 PN/DP MFP3.1.0
n/an/a*
NuGetlibxml22.9.4
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP3.1.0

Timeline

  • May 18, 2017 CVE Published
  • Apr 14, 2021 EPSS Score (30 in total, the first dated here)
  • Oct 25, 2023 CVE Updated
  • Dec 16, 2025 PoC Published
  • Mar 6, 2026 Distribution Patch (5 in total, the first dated here)
  • Mar 6, 2026 Security Advisory (5 in total, the first dated here)
  • Sep 27, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2017-9047
vulnetix vdb fixes CVE-2017-9047

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2017-9047/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›