BuzzPHP
LightDarkSystem

PhpSpreadsheet: XmlScanner Bypass via Double-Encoded unentity() TOCTOU Allows XXE and Denial of Service

High severity. Published 27 October 2026. Update phpoffice/phpspreadsheet to the fixed version of your branch (5.10.0, 3.10.8): composer update phpoffice/phpspreadsheet.

Which versions are affected?

PackageAffected versionsFixed in
phpoffice/phpspreadsheet (opens in a new tab)>= 4.0.0, <= 5.9.0 | >= 3.3.0, <= 3.10.75.10.0, 3.10.8

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show phpoffice/phpspreadsheet
composer audit

Advisory details

SeverityHigh
Published
Updated
CVECVE-2026-108357 (opens in a new tab)
GHSAGHSA-rxj4-h86g-25gc (opens in a new tab)
WeaknessCWE-611, CWE-776

What the advisory says

Summary The SpreadsheetML XML reader (Reader\Xml) scans file content twice through XmlScanner::scan(), and each scan runs an unentity() callback that calls htmlentitydecode() after the pattern check. By double-encoding the processing instruction) and processes them with PhpSpreadsheet's Xml reader is vulnerable.

Source: GHSA-rxj4-h86g-25gc (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

Other recent advisories for this package

All Composer security advisories