1. Home
  2. Vulnerabilities
  3. CVE-2026-108357

CVE-2026-108357

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

Published 22 Oct 2026 · modified 23 Oct 2026 · Sources: NVD, CNA (vendor or assigner), CERT-FR, EPSS (FIRST)

Medium 48/100

Summary

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.

Affected products and versions

Phpoffice (1 line(s))
Phpoffice
ProductVersionsFixed inSource
Phpspreadsheet Versions not specified — CNA (vendor or assigner)
Packagist (2 line(s))
Packagist
ProductVersionsFixed inSource
phpoffice/phpspreadsheet from 4.0.0 (included) to 5.10.0 (excluded) 5.10.0 GitHub Advisory
phpoffice/phpspreadsheet from 3.3.0 (included) to 3.10.8 (excluded) 3.10.8 GitHub Advisory

Fix

Upgrade — Packagist/phpoffice/phpspreadsheet 5.10.0; Packagist/phpoffice/phpspreadsheet 3.10.8official source

Source : GitHub Advisory

Workaround

No workaround provided.

Check whether you are affected

No verification method provided.

Timeline

  1. — CVE published (cve)

CERT-FR advisories

References

Data provenance

Status
NVD
Publication date
NVD
Description
CNA (vendor or assigner)
CVSS score
CNA (vendor or assigner)
Weakness (CWE)
NVD
CVSS vector
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 (CVSS 4.0, CNA:GitHub_M)
Weakness
CWE-611 · Autre (CWE-611)

How this data is obtained and calculated