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

Published Oct 22, 2026
·
Updated

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 LIBXMLNOENT is enabled. This issue is fixed in versions 3.10.8 and 5.10.0.

Affected Software

1 affected component
PHPOffice phpspreadsheet>=3.3.0<3.10.8, <5.10.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade PhpSpreadsheet to a version that resolves this vulnerability.

    Fixed in 3.10.8
  2. Upgrade

    Upgrade PhpSpreadsheet to a version that resolves this vulnerability.

    Fixed in 5.10.0

Event History

Oct 22, 2026
CVE Published
via MITRE·05:38 PM
Data Sourced
via MITRE·05:38 PM
DescriptionWeakness

Frequently Asked Questions

1

Which deployments are exposed to file disclosure or SSRF rather than only denial of service?

Local file access or SSRF is possible on PHP versions before 8.0, or in environments where LIBXML_NOENT is enabled. Entity-expansion denial of service can result when attacker-controlled SpreadsheetML XML is processed.

2

What input must an attacker control to exploit this issue?

The attacker needs to supply SpreadsheetML XML that the application processes through PhpSpreadsheet's XML reader. The bypass uses a double-encoded less-than character so a DOCTYPE and entity declaration reach SimpleXML after the scanner's checks.

3

Which versions should be remediated?

Upgrade to PhpSpreadsheet 3.10.8 or 5.10.0. The affected ranges are from 3.3.0 through 3.10.8 and version 5.10.0 as stated in the advisory data.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203