CVE-2024-47873 json
PhpSpreadsheet XmlScanner bypass leads to XXE
published last yr. modified 4mo 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
Is CVE-2024-47873 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- last yr.
Exploit prediction
0.76% chance of exploitation in the next 30 days, higher than 55% of all scored CVEs (FIRST EPSS, 2026-11-11).
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
-
github.com
/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-jw4x-v69f-hh5w
web, exploit, vendor-advisory
-
github.com
/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/Xml
web, product
-
owasp.org
/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing
web, not-applicable
-
w3.org
/TR/xml/#sec-guessing-no-ext-info
web, technical-description
-
nvd.nist.gov
/vuln/detail/CVE-2024-47873
advisory
-
github.com
/PHPOffice/PhpSpreadsheet
package
Sources
- CVE List CVE-2024-47873
- GitHub Advisory GHSA-jw4x-v69f-hh5w
- NVD CVE-2024-47873
Fencer Intel 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.