CVE-2016-5851 json
Improper Restriction of XML External Entity Reference in python-docx
published 2016-12-21 9 y ago modified 2026-06-17 4 mo ago also GHSA-34wj-p5jm-2p96 , PYSEC-2016-21 , EUVD-2016-0027
- cvss
- 8.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.4%
- EPSS 2.4% chance of exploitation in 30 days, percentile 83%
- public exploits
- 0
- none known
Summary
python-docx before 0.8.6 allows context-dependent attackers to conduct XML External Entity (XXE) attacks via a crafted document.
Patch / fix
- pypi python-docx 0.8.6
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2016-5851 updated cvss 5.9
python-docx: XML External Entity Attack
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
2.35% chance of exploitation in the next 30 days, higher than 83% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | python-docx | <0.8.6 |
0.8.6 |
Classification
- Weakness
-
- CWE-611 Improper Restriction of XML External Entity Reference
References
-
github.com
/python-openxml/python-docx/commit/61b40b161b64173ab8e362aec1fd197948431beb
web
-
openwall.com
/lists/oss-security/2016/06/28/7
mailing-list, web, patch, third-party-advisory
-
github.com
/python-openxml/python-docx/blob/v0.8.6/HISTORY.rst
web, patch, release-notes, vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/6FFMOH7ZPOPQWNJGUZOS5LXX4MGNRXXT/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/XU2WSYRNB7CLBBFCGSX34XHACTA2SWDZ/
vendor-advisory
-
openwall.com
/lists/oss-security/2016/06/28/8
mailing-list, web, third-party-advisory
-
securityfocus.com
/bid/91485
vdb-entry, web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2016-5851
advisory
-
github.com
/advisories/GHSA-34wj-p5jm-2p96
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/python-docx/PYSEC-2016-21.yaml
web
-
github.com
/python-openxml/python-docx
package
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/6FFMOH7ZPOPQWNJGUZOS5LXX4MGNRXXT
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/XU2WSYRNB7CLBBFCGSX34XHACTA2SWDZ
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/6FFMOH7ZPOPQWNJGUZOS5LXX4MGNRXXT
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/XU2WSYRNB7CLBBFCGSX34XHACTA2SWDZ
web
-
web.archive.org
/web/20170214030949/http://www.securityfocus.com/bid/91485
web
Sources
- CVE List CVE-2016-5851
- GitHub Advisory GHSA-34wj-p5jm-2p96
- NVD CVE-2016-5851
- OSV PYSEC-2016-21
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.