Skip to content
Laskyr

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

The advisory does not name a fixed version

This denial of service issue affects phpoffice/phpspreadsheet in 2 release lines: >= 3.3.0, <= 3.10.7; >= 4.0.0, <= 5.9.0. The newest release (5.10.0) is outside the affected range.

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?

Run composer show phpoffice/phpspreadsheet in your project, then enter the version. We check it against this and every other known phpoffice/phpspreadsheet advisory.

Who can exploit CVE-2026-108357

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

Your app is only exposed if it uses the affected part of phpoffice/phpspreadsheet. The advisory below says which part that is. If you are not sure, upgrade anyway: it costs less than finding out.

How to fix CVE-2026-108357 in phpoffice/phpspreadsheet

  1. Find the installed version: composer show phpoffice/phpspreadsheet. If you never required it yourself, composer why phpoffice/phpspreadsheet shows which package pulls it in.
  2. Update it: composer update phpoffice/phpspreadsheet --with-all-dependencies.
  3. 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.
  4. Run composer audit. It reads the same advisory data and should no longer list CVE-2026-108357.
  5. Commit composer.lock and deploy it. On the server, run composer install --no-dev from the lock file, not composer update.

If you cannot upgrade yet

General hardening for denial of service issues while the upgrade waits. None of it replaces the fix.

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.

Description from the CVE record, published by GitHub (the CVE Numbering Authority), via the NVD entry for CVE-2026-108357. Advisory title: “PhpSpreadsheet: XmlScanner Bypass via Double-Encoded unentity() TOCTOU Allows XXE and Denial of Service”.

References

Other phpoffice/phpspreadsheet advisories

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 fix

Where this data comes from

First hour checklist

If the site was just hacked, read the emergency kit before you delete files. The page is free. Email is optional.

Read the emergency kit