Miggo Logo

CVE-2024-45293:
XXE in PHPSpreadsheet's XLSX reader

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.95418%
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:N/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
phpoffice/phpspreadsheetcomposer>= 2.2.0, < 2.3.02.3.0
phpoffice/phpspreadsheetcomposer< 1.29.11.29.1
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 regex patterns in findCharSet() being too strict (lacking \s* to match whitespace around 'encoding='). This allowed attackers to inject UTF-7 encoded XML with XXE payloads. The toUtf8() function's security logic was dependent on this flawed detection, making both functions part of the vulnerability chain. The commit diff explicitly shows the regex being updated to include whitespace handling, confirming these functions as the root cause.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry T** s**urity s**nn*r r*sponsi*l* *or pr*v*ntin* XX* *tt**ks in t** XLSX r****r **n ** *yp*ss** *y sli**tly mo*i*yin* t** XML stru*tur*, utilizin* w*it*-sp***s. On s*rv*rs t**t *llow us*rs to uplo** t**ir own *x**l (XLSX) s***ts, S*rv*r *i

Reasoning

T** vuln*r**ility st*ms *rom t** r***x p*tt*rns in `*in****rS*t()` **in* too stri*t (l**kin* \\s* to m*t** w*it*sp*** *roun* '*n*o*in*='). T*is *llow** *tt**k*rs to inj**t UT*-* *n*o*** XML wit* XX* p*ylo**s. T** `toUt**()` *un*tion's s**urity lo*i*