{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2019-12331","id":"CVE-2019-12331","title":"XXE in PHPSpreadsheet due to incomplete fix for previous encoding issue","description":"PHPOffice PhpSpreadsheet before 1.8.0 has an XXE issue. The XmlScanner decodes the sheet1.xml from an .xlsx to utf-8 if something else than UTF-8 is declared in the header. This was a security measurement to prevent CVE-2018-19277 but the fix is not sufficient. By double-encoding the the xml payload to utf-7 it is possible to bypass the check for the string ‚<!ENTITY‘ and thus allowing for an xml ","descriptionLong":"PHPOffice PhpSpreadsheet before 1.8.0 has an XXE issue. The XmlScanner decodes the sheet1.xml from an .xlsx to utf-8 if something else than UTF-8 is declared in the header. This was a security measurement to prevent CVE-2018-19277 but the fix is not sufficient. By double-encoding the the xml payload to utf-7 it is possible to bypass the check for the string ‚<!ENTITY‘ and thus allowing for an xml external entity processing (XXE) attack.","published":"2019-11-07T14:03:43.000Z","updated":"2026-10-20T10:52:19.711097689Z","reserved":"2019-05-27T00: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":"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":[{"status":"affected","version":"n/a"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"phpoffice/phpspreadsheet","purl":"pkg:composer/phpoffice/phpspreadsheet","ranges":["<1.8.0"],"fixed":["1.8.0"],"advisory":"GHSA-vvwv-h69m-wg6f"},{"ecosystem":"Packagist","name":"phpoffice/phpexcel","purl":"pkg:composer/phpoffice/phpexcel","ranges":["<=1.8.2"],"fixed":[],"advisory":"GHSA-vvwv-h69m-wg6f"}],"cwes":["CWE-611"],"aliases":["GHSA-vvwv-h69m-wg6f"],"references":[{"url":"https://github.com/PHPOffice/PhpSpreadsheet/blob/master/CHANGELOG.md#180---2019-07-01","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://herolab.usd.de/security-advisories/usd-2019-0046/","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2019-12331","tags":["advisory"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/pull/1041","tags":["web"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/commit/0e6238c69e863b58aeece61e48ea032696c6dccd","tags":["web"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/phpoffice/phpspreadsheet/CVE-2019-12331.yaml","tags":["web"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet","tags":["package"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/1.8.0","tags":["web"]},{"url":"https://herolab.usd.de/security-advisories/usd-2019-0046","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.0135,"epssPercentile":0.72061,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2019-12331","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-12331","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2019-12331","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-vvwv-h69m-wg6f","ok":true,"note":"GHSA-vvwv-h69m-wg6f"},{"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-2019-12331","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}