CVE-2017-9047

Source
https://cve.org/CVERecord?id=CVE-2017-9047
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2017-9047.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2017-9047
Downstream
Related
Published
2017-05-18T06:29:00.403Z
Modified
2026-07-09T00:04:05.193346Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

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

References

Affected packages

Git / github.com/gnome/libxml2

Affected ranges

Type
GIT
Repo
https://github.com/gnome/libxml2
Events
Database specific
{
    "extracted_events": [
        {
            "introduced": "2.9.4"
        },
        {
            "last_affected": "2.9.4"
        }
    ],
    "cpe": "cpe:2.3:a:xmlsoft:libxml2:2.9.4:*:*:*:*:*:*:*",
    "source": "CPE_STRING"
}

Affected versions

2.*
2.9.4
v2.*
v2.9.4

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2017-9047.json"

Git / gitlab.gnome.org/gnome/libxml2

Affected ranges

Type
GIT
Repo
https://gitlab.gnome.org/gnome/libxml2
Events
Database specific
{
    "extracted_events": [
        {
            "introduced": "2.9.4"
        },
        {
            "last_affected": "2.9.4"
        }
    ],
    "cpe": "cpe:2.3:a:xmlsoft:libxml2:2.9.4:*:*:*:*:*:*:*",
    "source": "CPE_STRING"
}

Affected versions

2.*
2.9.4
v2.*
v2.9.4

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2017-9047.json"