Skip to content
Fencer Vulns
high 8.8

CVE-2019-12331 json

XXE in PHPSpreadsheet due to incomplete fix for previous encoding issue

published 2019-11-07 7 y ago modified 2026-06-17 4 mo ago also GHSA-vvwv-h69m-wg6f , EUVD-2019-0763

cvss
8.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
1.4%
EPSS 1.4% chance of exploitation in 30 days, percentile 71%
public exploits
0
none known

Summary

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.

Patch / fix

  • packagist phpoffice/phpspreadsheet 1.8.0
  • phpoffice phpspreadsheet 1.8.0

Exploit prediction

1.35% chance of exploitation in the next 30 days, higher than 71% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • herolab.usd.de https://herolab.usd.de/security-advisories/usd-2019-0046/ referenced PoC, tagged "exploit" by a source, unverified

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
packagist phpoffice/phpspreadsheet
<1.8.0
1.8.0
packagist phpoffice/phpexcel
<=1.8.2
no fix listed

Classification

Weakness
  • CWE-611 Improper Restriction of XML External Entity Reference

References

Sources

Fencer Vulns 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.