Miggo Logo

CVE-2024-45292: PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via JavaScript hyperlinks

5.4

CVSS Score
3.1

Basic Information

EPSS Score
0.38804%
Published
10/7/2024
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>= 2.2.0, < 2.3.02.3.0
phpoffice/phpspreadsheetcomposer< 1.29.21.29.2
phpoffice/phpspreadsheetcomposer>= 2.0.0, < 2.1.12.1.1
phpoffice/phpexcelcomposer<= 1.8.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the unvalidated handling of hyperlink URLs in the HTML generation process. The commit diff shows the fix was applied to the generateRow method in Html.php, where hyperlink URLs were previously embedded directly via htmlspecialchars() without protocol checks. The added validation logic in the patch (checking for allowed protocols like http/https) confirms this was the vulnerable code path. The PoC and CWE-79 classification further align with this being an XSS vector via improper output sanitization.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry `\P*pO**i**\P*pSpr***s***t\Writ*r\*tml` *o*s not s*nitiz* "j*v*s*ript:" URLs *rom *yp*rlink `*r**` *ttri*ut*s, r*sultin* in * *ross-Sit* S*riptin* vuln*r**ility. ### Po* *x*mpl* t*r**t s*ript: ``` <?p*p r*quir* 'v*n*or/*utolo**.p*p';

Reasoning

T** vuln*r**ility st*ms *rom t** unv*li**t** **n*lin* o* *yp*rlink URLs in t** *TML **n*r*tion pro**ss. T** *ommit *i** s*ows t** *ix w*s *ppli** to t** `**n*r*t*Row` m*t*o* in `*tml.p*p`, w**r* *yp*rlink URLs w*r* pr*viously *m****** *ir**tly vi* `*
CVE-2024-45292: PhpSpreadsheet HTML Writer XSS | Miggo