CVE-2025-23210 Bypass XSS sanitizer using the javascript protocol and special characters in phpoffice/phpspreadsheet
Attackers can bypass XSS sanitization in PhpSpreadsheet using the javascript protocol and special characters, potentially executing malicious scripts.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-23210?
CVE-2025-23210 is a medium-severity cross-site scripting vulnerability in PHPOffice PhpSpreadsheet, published on 3 Feb 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
phpoffice/phpspreadsheet is a pure PHP library for reading and writing spreadsheet files. Affected versions have been found to have a Bypass of the Cross-site Scripting (XSS) sanitizer using the javascript protocol and special characters. This issue has been addressed in versions 3.9.0, 2.3.7, 2.1.8, and 1.29.9. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Weakness: CWE-79
Which versions are affected by CVE-2025-23210?
10 open source packages ship an affected version, including phpoffice/phpspreadsheet and phpoffice/phpexcel.
| Package | Affected | Fixed in |
|---|---|---|
phpoffice/phpspreadsheet Packagist | All versions | 1.29.9 |
phpoffice/phpspreadsheet Packagist | All versions | 1.29.9 |
phpoffice/phpspreadsheet Packagist | From 2.0.0 | 2.1.8 |
phpoffice/phpspreadsheet Packagist | From 2.0.0 | 2.1.8 |
phpoffice/phpspreadsheet Packagist | From 2.2.0 | 2.3.7 |
phpoffice/phpspreadsheet Packagist | From 2.2.0 | 2.3.7 |
4 more packages
phpoffice/phpspreadsheet Packagist | From 3.0.0 | 3.9.0 |
phpoffice/phpspreadsheet Packagist | From 3.0.0 | 3.9.0 |
phpoffice/phpexcel Packagist | All versions to 1.8.2 | None |
phpoffice/phpexcel Packagist | All versions to 1.8.2 | None |
How do I fix CVE-2025-23210?
Upgrade phpoffice/phpspreadsheet to a fixed version for your release line: 1.29.9, 2.1.8, 2.3.7 or 3.9.0.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2025-23210 being exploited?
There is no known exploitation of CVE-2025-23210 in the wild and no public exploit code.
Sources
Also known as GHSA-r57h-547h-w24f.