CVE-2024-48917 json
XXE in PHPSpreadsheet's XLSX reader
published 2024-11-18 23 mo ago modified 2026-06-17 4 mo ago also EUVD-2024-3208 , GHSA-7cc9-j4mv-vcjp
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.7%
- EPSS 0.7% chance of exploitation in 30 days, percentile 54%
- 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, in a bypass of the previously reported `CVE-2024-47873`, the regexes from the `findCharSet` method, which is used for determining the current encoding can be bypassed by using a payload in the encoding UTF-7, and adding at end of the file a comment with the value `encoding="UTF-8"` with `"`, which is matched by the first regex, so that `encoding='UTF-7'` with single quotes `'` in the XML header is not matched by the second regex. 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
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 23 mo ago
Exploit prediction
0.73% chance of exploitation in the next 30 days, higher than 54% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-7cc9-j4mv-vcjp 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-7cc9-j4mv-vcjp
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
-
nvd.nist.gov
/vuln/detail/CVE-2024-48917
advisory
-
github.com
/PHPOffice/PhpSpreadsheet
package
Sources
- CVE List CVE-2024-48917
- GitHub Advisory GHSA-7cc9-j4mv-vcjp
- NVD CVE-2024-48917
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.