CVE-2016-5851
HIGH 8.8CVSS 3.1Improper Restriction of XML External Entity Reference in python-docx
python-docx before 0.8.6 allows context-dependent attackers to conduct XML External Entity (XXE) attacks via a crafted document.
- Published
- 21 Dec 2016
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-611
- Also known as
- GHSA-34wj-p5jm-2p96PYSEC-2016-21
- Sources
- NVDJSONOSV GHSA-34wj-p5jm-2p96JSONOSV PYSEC-2016-21JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | python-openxml_project | python-docxcpe:2.3:a:python-openxml_project:python-docx:*:*:*:*:*:*:*:* |
<= 0.8.5 | |
| OSV | PyPI | python-docx | < 0.8.6 | 0.8.6 |
References
- http://www.openwall.com/lists/oss-security/2016/06/28/7 · Mailing List, Patch, Third Party Advisory, WEB
- http://www.openwall.com/lists/oss-security/2016/06/28/8 · Mailing List, Third Party Advisory, WEB
- http://www.securityfocus.com/bid/91485 · Third Party Advisory, VDB Entry, WEB
- https://github.com/python-openxml/python-docx/blob/v0.8.6/HISTORY.rst · Patch, Release Notes, Vendor Advisory, WEB
- https://github.com/python-openxml/python-docx/commit/61b40b161b64173ab8e362aec1fd197948431beb · WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6FFMOH7ZPOPQWNJGUZOS5LXX4MGNRXXT/ · WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XU2WSYRNB7CLBBFCGSX34XHACTA2SWDZ/ · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2016-5851 · ADVISORY
- https://github.com/advisories/GHSA-34wj-p5jm-2p96 · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/python-docx/PYSEC-2016-21.yaml · WEB
- https://github.com/python-openxml/python-docx · PACKAGE
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6FFMOH7ZPOPQWNJGUZOS5LXX4MGNRXXT · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XU2WSYRNB7CLBBFCGSX34XHACTA2SWDZ · WEB
- https://web.archive.org/web/20170214030949/http://www.securityfocus.com/bid/91485 · WEB
History
- 25 Nov 2026 20:19 UTC · NVD: first stored (published 21 Dec 2016)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 21 Dec 2016)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 13 May 2022)