Miggo Logo

CVE-2025-23210:
PhpSpreadsheet allows bypassing of XSS sanitizer using the javascript protocol and special characters

5.4

CVSS Score
3.1

Basic Information

EPSS Score
0.30321%
Published
2/3/2025
Updated
3/6/2025
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
phpoffice/phpspreadsheetcomposer>= 3.0.0, < 3.9.03.9.0
phpoffice/phpspreadsheetcomposer< 1.29.91.29.9
phpoffice/phpspreadsheetcomposer>= 2.2.0, < 2.3.72.3.7
phpoffice/phpspreadsheetcomposer>= 2.0.0, < 2.1.82.1.8
phpoffice/phpexcelcomposer<= 1.8.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key functions:

  1. generateRow() in Html.php: The original regex failed to account for control characters in protocol validation, allowing attackers to bypass the XSS sanitizer by prefixing 'javascript:' with special characters. The commit explicitly patches this regex to include \x00-\x1f range.
  2. setPath() in Drawing.php: The URL validation logic allowed protocols with control characters due to incomplete filtering. The patch adds regex checks to block these characters. Both functions were directly modified in the security commit (cde2926), and the vulnerability description explicitly references generateRow as the vulnerable component. The exploitation example uses XML hyperlinks with CHAR() functions to trigger the issue, which maps to these validation flaws.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

**Pro*u*t:** P*pSpr***s***t **V*rsion:** *.*.* ***W*-I*:** *W*-**: Improp*r N*utr*liz*tion o* Input *urin* W** P*** **n*r*tion ('*ross-sit* S*riptin*') ***VSS v**tor v.*.*:** *.* (*V:N/**:L/PR:L/UI:R/S:*/*:L/I:L/*:N) ***VSS v**tor v.*.*:** *.* (*V:N/

Reasoning

T** vuln*r**ility st*ms *rom two k*y *un*tions: *. **n*r*t*Row() in *tml.p*p: T** ori*in*l r***x **il** to ***ount *or *ontrol ***r**t*rs in proto*ol v*li**tion, *llowin* *tt**k*rs to *yp*ss t** XSS s*nitiz*r *y pr**ixin* 'j*v*s*ript:' wit* sp**i*l *