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

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

Canonical URL: https://buzzphp.com/security/ghsa-rxj4-h86g-25gc · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high |
| Published | 2026-10-27 |
| Updated | 2026-10-27 |
| CVE | [CVE-2026-108357](https://nvd.nist.gov/vuln/detail/CVE-2026-108357) |
| GHSA | [GHSA-rxj4-h86g-25gc](https://github.com/advisories/GHSA-rxj4-h86g-25gc) |
| Weakness | CWE-611, CWE-776 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| phpoffice/phpspreadsheet | >= 4.0.0, <= 5.9.0 or >= 3.3.0, <= 3.10.7 | 5.10.0, 3.10.8 |

## What to do

Update phpoffice/phpspreadsheet to the fixed version of your branch (5.10.0, 3.10.8): composer update phpoffice/phpspreadsheet.

Check which version you run with `composer show phpoffice/phpspreadsheet`, and every affected package with `composer audit`.

## About this advisory

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.

## Links

- [GHSA-rxj4-h86g-25gc on GitHub](https://github.com/advisories/GHSA-rxj4-h86g-25gc)
- [CVE-2026-108357 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-108357)
- [All Composer security advisories](https://buzzphp.com/security)
