Skip to content
Fencer Vulns
high 7.5

CVE-2024-47873 json

PhpSpreadsheet XmlScanner bypass leads to XXE

published 2024-11-18 23 mo ago modified 2026-06-17 4 mo ago also EUVD-2024-3279 , GHSA-jw4x-v69f-hh5w

cvss
7.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.8%
EPSS 0.8% chance of exploitation in 30 days, percentile 55%
public exploits
0
none known

Summary

PhpSpreadsheet is a PHP library for reading and writing spreadsheet files. The XmlScanner class has a scan method which should prevent XXE attacks. However, prior to versions 1.9.4, 2.1.3, 2.3.2, and 3.4.0, the regexes used in the `scan` method and the findCharSet method can be bypassed by using UCS-4 and encoding guessing. An attacker can bypass the sanitizer and achieve an XML external entity attack. Versions 1.9.4, 2.1.3, 2.3.2, and 3.4.0 fix the issue.

Patch / fix

  • packagist phpoffice/phpspreadsheet 1.29.4, 2.1.3, 2.3.2, 3.4.0
  • PHPOffice PhpSpreadsheet 1.29.4, 2.1.3, 2.3.2, 3.4.0

CISA SSVC

Exploitation
Proof of concept is public
Automatable
yes
Technical impact
partial
Assessed
23 mo ago

Exploit prediction

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

Exploits and checks

  • github.com https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-jw4x-v69f-hh5w referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHub 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected packages

ecosystem package affected fixed in
packagist phpoffice/phpspreadsheet
<1.29.4
>=2.0.0, <2.1.3
>=2.2.0, <2.3.2
>=3.3.0, <3.4.0
1.29.4
2.1.3
2.3.2
3.4.0
packagist phpoffice/phpexcel
<=1.8.2
no fix listed

Affected products

  • PHPOffice PhpSpreadsheet

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.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.