PhpSpreadsheet XLSX reader can be tricked into parsing dangerous XML
A specially crafted Excel (.xlsx) file can make a PHP app that reads spreadsheets slow down or crash, and on some setups can read server files. This happens because a security check misses hidden escape characters inside the file.
| Severity | HighCVSS 8.8 of 10 |
|---|---|
| Being exploited? | UnclearNo reports either way yet |
| Fix available? | Yesphpoffice/phpspreadsheet 5.10.0, 3.10.8, 2.4.8, 2.1.19, or 1.30.7 (or later in the same branch). · since 27 Oct 2026 |
| How sure is this? | Official, 2 sourcesBacked by an official source |
How the attack works simplified
- 1Attacker crafts fileXLSX contains DOCTYPE hidden by escape bytes
- 2Upload to appApp reads the spreadsheet with PhpSpreadsheet
- 3Scanner misses DOCTYPEISO-2022 escapes break the detection pattern
- 4XML parser expands entitiesCharset normalization exposes the DOCTYPE
- ResultServer slows down, crashes, or leaks files
What happened
XmlScanner::scan() in PhpSpreadsheet detects <!DOCTYPE only when NUL bytes are interleaved; ISO-2022 escape sequences (0x1B) between characters evade the regex, letting DOCTYPE with entity definitions reach the XML parser.
Are you affected?
You are affected if your application uses PhpSpreadsheet 4.0.0–5.9.0, 3.3.0–3.10.7, 2.2.0–2.4.7, 2.0.0–2.1.18, or 1.30.6 and older, to process user-uploaded XLSX files.
| Package / product | Affected versions | Fixed in |
|---|---|---|
| phpoffice/phpspreadsheet · composer | >= 4.0.0, <= 5.9.0 | 5.10.0 |
| phpoffice/phpspreadsheet · composer | >= 3.3.0, <= 3.10.7 | 3.10.8 |
| phpoffice/phpspreadsheet · composer | >= 2.2.0, <= 2.4.7 | 2.4.8 |
| phpoffice/phpspreadsheet · composer | >= 2.0.0, <= 2.1.18 | 2.1.19 |
| phpoffice/phpspreadsheet · composer | <= 1.30.6 | 1.30.7 |
What to do
- Update phpoffice/phpspreadsheet to 5.10.0, 3.10.8, 2.4.8, 2.1.19, or 1.30.7 via Composer, matching your major version
- Run 'composer show phpoffice/phpspreadsheet' to confirm the installed version
- If you cannot update right away, reject or sandbox user-uploaded XLSX files before parsing
- Make sure LIBXML_NOENT is not enabled in your XML handling
Timeline
- 22 Oct 2026, 18:17 UTCPublicly disclosed
- 22 Oct 2026, 18:17 UTCReported by NVD · NVD
- 27 Oct 2026, 15:38 UTCGitHub Advisory reported on it · GitHub Advisory
- 27 Oct 2026, 15:38 UTCFixed version published: phpoffice/phpspreadsheet 5.10.0, phpoffice/phpspreadsheet 3.10.8, phpoffice/phpspreadsheet 2.4.8 · GitHub Advisory
Sources 2 reports, oldest first
Official vendor, government CERT or advisory database
- NVD22 Oct 2026, 18:17 UTC
- PhpSpreadsheet: XmlScanner Bypass via ISO-2022 Escape Sequences Allows XXE and Denial of ServiceGitHub Advisory · 27 Oct 2026, 15:38 UTC
Technical details
- ID
- CVE-2026-108358 · GHSA-3x94-m842-937c
- CVSS
- 8.8 / 10
- EPSS
- 0.6% chance of exploitation within 30 days
- Disclosed
- 22 Oct 2026, 18:17 UTC
- On Zero Radar
- before the radar started
- Last change
- 27 Oct 2026, 15:38 UTC
The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works