phpoffice/phpspreadsheet security advisory
CVE-2026-108357: PhpSpreadsheet: XmlScanner Bypass via Double-Encoded unentity() TOCTOU Allows XXE and Denial of Service
CVE-2026-108357 is a high-severity denial of service vulnerability in the PHP package phpoffice/phpspreadsheet (CVSS 8.8), published 22 October 2026. The advisory does not name a fixed version. It can be exploited without an account.
high 8.8 published 2026-10-22 · updated 2026-10-23
- Affected versions
- >= 3.3.0, <= 3.10.7
>= 4.0.0, <= 5.9.0 - Fixed in
- not stated
- Newest release
- 5.10.0
- Severity
- High · CVSS 8.8
- Type
- Denial of service
CWE-611, CWE-776 - Exploited in the wild
- Not on the CISA KEV list
checked 2026-11-04
Is your phpoffice/phpspreadsheet version affected?
Who can exploit CVE-2026-108357
- Access: No account. Anyone who can send a request to an app that uses the affected code.
CVSS vector (scored by GitHub): CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:L/SI:N/SA:N
How to fix CVE-2026-108357 in phpoffice/phpspreadsheet
- Find the installed version:
composer show phpoffice/phpspreadsheet. If you never required it yourself,composer why phpoffice/phpspreadsheetshows which package pulls it in. - Update it:
composer update phpoffice/phpspreadsheet --with-all-dependencies. - If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example
"phpoffice/phpspreadsheet": "^5.10.0"if you can take that version), or upgrade the package that requires it. - Run
composer audit. It reads the same advisory data and should no longer list CVE-2026-108357. - Commit composer.lock and deploy it. On the server, run
composer install --no-devfrom the lock file, notcomposer update.
If you cannot upgrade yet
- Rate-limit the affected endpoint and cap request body, header and upload sizes at the web server.
- If your app does not use the affected feature, note that in your audit, but still plan the upgrade.
The CVE-2026-108357 advisory
PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. From 3.3.0 until 3.10.8 and 5.10.0, Reader\Xml passes stored SpreadsheetML XML through XmlScanner::scan in Xml::canRead and Xml::trySimpleXMLLoadStringPrivate, while Xml::unentity decodes numeric entities only after each DOCTYPE pattern check. A double-encoded less-than character is reduced by the first callback to another encoded character and by the second callback to a literal less-than sign, so SimpleXML receives an unchecked DOCTYPE and entity declaration. Processing attacker-controlled SpreadsheetML XML can cause entity-expansion denial of service and can permit local file access or SSRF on PHP before 8.0 or when LIBXML_NOENT is enabled. This issue is fixed in versions 3.10.8 and 5.10.0.
References
- GitHub advisory GHSA-rxj4-h86g-25gc github.com
- Fix commit 89f455c github.com
- Fix commit 980b5c2 github.com
- Release 3.10.8 github.com
- Release 5.10.0 github.com
Other phpoffice/phpspreadsheet advisories
- medium CVE-2026-108360: PhpSpreadsheet: SSRF whitelist bypass via unre-validated HTTP redirect in Drawing::setPath external image loading 2026-10-27
- high CVE-2026-108359: PhpSpreadsheet ODS Reader: Unbounded number-rows-repeated → CPU & Memory Exhaustion (DoS) 2026-10-27
- high CVE-2026-108358: PhpSpreadsheet: XmlScanner Bypass via ISO-2022 Escape Sequences Allows XXE and Denial of Service 2026-10-27
- high CVE-2026-59933: PHPSpreadsheet: XLS/OLE sector-chain self-loop causes memory exhaustion 2026-07-23
- high CVE-2026-59932: PHPSpreadsheet: Gnumeric reader unbounded gzip expansion causes memory exhaustion 2026-07-23
- high CVE-2026-59931: PHPSpreadsheet: SSRF bypass via HTTP redirect in WEBSERVICE() domain whitelist 2026-07-23
Related
Need help patching or upgrading? Laskyr does PHP and Laravel security fixes and upgrades. Tell us what you run and we reply with a plan and a price.
Ask about a fixWhere this data comes from
- Affected and fixed versions: the Packagist security advisories API (GitHub Advisory Database and FriendsOfPHP), the same data
composer audituses. Synced 2026-11-03. - Description, score, weakness and references: NIST National Vulnerability Database (NVD), checked 2026-11-04. This product uses data from the NVD API but is not endorsed or certified by the NVD.
- Exploited-in-the-wild status: the CISA Known Exploited Vulnerabilities catalog, checked 2026-11-04.
- Compiled by Daniel Lasek at Laskyr from the sources above. The summary, “who can exploit it”, “how to fix it” and hardening sections are our plain-English reading of the record and are generated from it. The quoted description is the record's own text. Spot an error? Tell us.