CVE-2017-9047 Memory corruption in n/a

High 7.5 Published Updated

A buffer overflow in libxml2 allows attackers to cause a denial of service via crafted XML input, affecting applications using the library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2017-9047?

CVE-2017-9047 is a high-severity memory corruption vulnerability in Xmlsoft Libxml2, published on 18 May 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-119

Which versions are affected by CVE-2017-9047?

It affects 1 product.

Products include Xmlsoft Libxml2.

How do I fix CVE-2017-9047?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2017-9047 being exploited?

There is no known exploitation of CVE-2017-9047 in the wild and no public exploit code.

All Xmlsoft Libxml2 vulnerabilities

Sources

Also known as DEBIAN-CVE-2017-9047, ECHO-29eb-b2c5-e0e1, GHSA-m5m9-w72w-8c23, UBUNTU-CVE-2017-9047.

Is CVE-2017-9047 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free