CVE-2019-12331
HIGH 8.8CVSS 3.1XXE in PHPSpreadsheet due to incomplete fix for previous encoding issue
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
- 7 Nov 2019
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-611
- Also known as
- GHSA-vvwv-h69m-wg6f
- Sources
- NVDJSONOSV GHSA-vvwv-h69m-wg6fJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| 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 | phpoffice | phpspreadsheetcpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:* |
< 1.8.0 | 1.8.0 |
| OSV | Packagist | phpoffice/phpspreadsheet | < 1.8.0 | 1.8.0 |
| OSV | Packagist | phpoffice/phpexcel | <= 1.8.2 |
References
- https://github.com/PHPOffice/PhpSpreadsheet/blob/master/CHANGELOG.md#180---2019-07-01 · Third Party Advisory, WEB
- https://herolab.usd.de/security-advisories/usd-2019-0046/ · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2019-12331 · ADVISORY
- https://github.com/PHPOffice/PhpSpreadsheet/pull/1041 · WEB
- https://github.com/PHPOffice/PhpSpreadsheet/commit/0e6238c69e863b58aeece61e48ea032696c6dccd · WEB
- https://github.com/FriendsOfPHP/security-advisories/blob/master/phpoffice/phpspreadsheet/CVE-2019-12331.yaml · WEB
- https://github.com/PHPOffice/PhpSpreadsheet · PACKAGE
- https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/1.8.0 · WEB
History
- 25 Nov 2026 20:31 UTC · NVD: first stored (published 7 Nov 2019)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 20 Nov 2019)