{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2016-5851","id":"CVE-2016-5851","title":"Improper Restriction of XML External Entity Reference in python-docx","description":"python-docx before 0.8.6 allows context-dependent attackers to conduct XML External Entity (XXE) attacks via a crafted document.","descriptionLong":"python-docx before 0.8.6 allows context-dependent attackers to conduct XML External Entity (XXE) attacks via a crafted document.","published":"2016-12-21T00:00:00.000Z","updated":"2026-10-20T10:47:29.914617308Z","reserved":"2016-06-28T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"4.0","score":null,"vector":"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","rating":"high","source":"GitHub"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"},{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","rating":"medium","source":"NVD"}],"rating":"high","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"version":"n/a","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"python-docx","purl":"pkg:pypi/python-docx","ranges":["<0.8.6"],"fixed":["0.8.6"],"advisory":"GHSA-34wj-p5jm-2p96"}],"cwes":["CWE-611"],"aliases":["GHSA-34wj-p5jm-2p96","PYSEC-2016-21"],"references":[{"url":"http://www.openwall.com/lists/oss-security/2016/06/28/7","tags":["mailing-list","x_transferred","Mailing List","Patch","Third Party Advisory","fix","web"]},{"url":"http://www.openwall.com/lists/oss-security/2016/06/28/8","tags":["mailing-list","x_transferred","Mailing List","Third Party Advisory","advisory","web"]},{"url":"https://github.com/python-openxml/python-docx/blob/v0.8.6/HISTORY.rst","tags":["x_transferred","Patch","Release Notes","Vendor Advisory","fix","web"]},{"url":"http://www.securityfocus.com/bid/91485","tags":["vdb-entry","x_transferred","Third Party Advisory","VDB Entry","advisory","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6FFMOH7ZPOPQWNJGUZOS5LXX4MGNRXXT/","tags":["vendor-advisory","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XU2WSYRNB7CLBBFCGSX34XHACTA2SWDZ/","tags":["vendor-advisory","x_transferred","web"]},{"url":"https://github.com/python-openxml/python-docx/commit/61b40b161b64173ab8e362aec1fd197948431beb","tags":["x_transferred","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-5851","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-34wj-p5jm-2p96","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/python-docx/PYSEC-2016-21.yaml","tags":["web"]},{"url":"https://github.com/python-openxml/python-docx","tags":["package"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6FFMOH7ZPOPQWNJGUZOS5LXX4MGNRXXT","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XU2WSYRNB7CLBBFCGSX34XHACTA2SWDZ","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6FFMOH7ZPOPQWNJGUZOS5LXX4MGNRXXT","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XU2WSYRNB7CLBBFCGSX34XHACTA2SWDZ","tags":["web"]},{"url":"https://web.archive.org/web/20170214030949/http://www.securityfocus.com/bid/91485","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.02354,"epssPercentile":0.84061,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2016-5851","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2016-5851","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2016-5851","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-34wj-p5jm-2p96","ok":true,"note":"GHSA-34wj-p5jm-2p96"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2016-5851","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}