Description
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.
Published: 2026-10-22
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: External Entity Exposure and Denial of Service
Action: Patch Immediately
AI Analysis

Impact

PhpSpreadsheet’s XmlScanner allows double-encoded less‑than characters to bypass the entity scan that occurs after a DOCTYPE check. The unentity() routine decodes numeric entities only after the DOCTYPE pattern is verified, so a double‑encoded character is decoded twice: first into another encoded form and then into a literal less‑than sign. This results in an unchecked DOCTYPE parsed by SimpleXML, permitting a malicious SpreadsheetML document to declare external entities. The consequence is a classic XML External Entity (XXE) vulnerability that can lead to file disclosure, server‑side request forgery (SSRF) on PHP when LIBXML_NOENT is enabled, and an entity‑expansion denial‑of‑service attack. The underlying weakness is a race condition (TOCTOU) combined with improper handling of entity decoding, corresponding to CWE‑611 and CWE‑776.

Affected Systems

The library PHPOffice:PhpSpreadsheet is affected in every release from 3.3.0 through 3.10.8 and in 5.10.0. Versions prior to 3.10.8 and 5.10.0 are vulnerable. The issue has been fixed as of the 3.10.8 and 5.10.0 releases, so any installation using an older version should be upgraded. GitHub commits 89f455c and 980b5c and the 3.10.8 and 5.10.0 releases contain the security fix.

Risk and Exploitability

The CVSS score of 8.8 marks this as a high‑severity vulnerability. The EPSS score is not available, but the absence of current exploitation data does not diminish the risk because the weakness permits local file access or SSRF and can cause a denial of service. Although it is not listed in the CISA KEV catalog, the potential impact on confidentiality, integrity, and availability is significant for any system that processes untrusted spreadsheet files through PhpSpreadsheet. The likely attack vector involves uploading or loading a malicious SpreadsheetML file from an attacker into an application that uses this library. Successful exploitation requires the library to parse the file; therefore, the risk is highest when the code path is exposed to untrusted input.

Generated by OpenCVE AI on October 22, 2026 at 18:11 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PhpSpreadsheet to version 3.10.8 or 5.10.0 or later.
  • Configure the parser to disallow entity expansion, for example by ensuring LIBXML_NOENT is not enabled or by removing DOCTYPE support.
  • Validate and sanitize spreadsheet input, rejecting files from untrusted sources, and isolate the file parsing environment to prevent SSRF or local file access.

Generated by OpenCVE AI on October 22, 2026 at 18:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-rxj4-h86g-25gc PhpSpreadsheet: XmlScanner Bypass via Double-Encoded unentity() TOCTOU Allows XXE and Denial of Service
History

Fri, 23 Oct 2026 22:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 23 Oct 2026 00:45:00 +0000

Type Values Removed Values Added
First Time appeared Phpoffice
Phpoffice phpspreadsheet
Vendors & Products Phpoffice
Phpoffice phpspreadsheet

Thu, 22 Oct 2026 17:45:00 +0000

Type Values Removed Values Added
Description 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.
Title PhpSpreadsheet: XmlScanner Bypass via Double-Encoded unentity() TOCTOU Allows XXE and Denial of Service
Weaknesses CWE-611
CWE-776
References
Metrics cvssV4_0

{'score': 8.8, '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'}


Subscriptions

Phpoffice Phpspreadsheet
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-23T21:08:17.784Z

Reserved: 2026-10-09T20:32:44.301Z

Link: CVE-2026-108357

cve-icon Vulnrichment

Updated: 2026-10-23T17:32:58.173Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-22T18:17:26.377

Modified: 2026-10-23T22:16:53.180

Link: CVE-2026-108357

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-22T18:45:09Z

Weaknesses
  • CWE-611

    Improper Restriction of XML External Entity Reference

  • CWE-776

    Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')