CVE-2025-23210 Bypass XSS sanitizer using the javascript protocol and special characters in phpoffice/phpspreadsheet

Medium 4.8 Published Updated

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.

PackageAffectedFixed in
phpoffice/phpspreadsheet PackagistAll versions1.29.9
phpoffice/phpspreadsheet PackagistAll versions1.29.9
phpoffice/phpspreadsheet PackagistFrom 2.0.02.1.8
phpoffice/phpspreadsheet PackagistFrom 2.0.02.1.8
phpoffice/phpspreadsheet PackagistFrom 2.2.02.3.7
phpoffice/phpspreadsheet PackagistFrom 2.2.02.3.7
4 more packages
phpoffice/phpspreadsheet PackagistFrom 3.0.03.9.0
phpoffice/phpspreadsheet PackagistFrom 3.0.03.9.0
phpoffice/phpexcel PackagistAll versions to 1.8.2None
phpoffice/phpexcel PackagistAll versions to 1.8.2None

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.

Is CVE-2025-23210 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free