CVE-2024-47873Phpoffice Phpspreadsheet
High 7.5 No auth needed
Follow: this CVE · Phpoffice · Phpoffice Phpspreadsheet We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 1.0% probability of exploitation in 30 days · percentile 62
- Auth required
- No
- Published
- Nov 18, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-611
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Phpspreadsheet.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | phpoffice/phpexcel |
≤ 1.8.2 |
no fixed version | — |
| Packagist | phpoffice/phpspreadsheet |
< 1.29.4 |
1.29.4 |
composer require "phpoffice/phpspreadsheet:^1.29.4" |
| Packagist | phpoffice/phpspreadsheet |
≥ 2.0.0 < 2.1.3 |
2.1.3 |
composer require "phpoffice/phpspreadsheet:^2.1.3" |
| Packagist | phpoffice/phpspreadsheet |
≥ 2.2.0 < 2.3.2 |
2.3.2 |
composer require "phpoffice/phpspreadsheet:^2.3.2" |
| Packagist | phpoffice/phpspreadsheet |
≥ 3.3.0 < 3.4.0 |
3.4.0 |
composer require "phpoffice/phpspreadsheet:^3.4.0" |
Per OSV / GitHub Advisories (GHSA-jw4x-v69f-hh5w). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| phpoffice | phpspreadsheet | < 1.29.4 |
| phpoffice | phpspreadsheet | ≥ 2.0.0 < 2.1.3 |
| phpoffice | phpspreadsheet | ≥ 2.2.0 < 2.3.2 |
| phpoffice | phpspreadsheet | ≥ 3.3.0 < 3.4.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Product
- github.com Exploit Vendor Advisory
- owasp.org Not Applicable
- www.w3.org Technical Description