Skip to content
OpenAdvisories
High · 8.8 CVE-2026-108358 EUVD-2026-108265GHSA-3x94-m842-937c

PhpSpreadsheet: XmlScanner Bypass via ISO-2022 Escape Sequences Allows XXE and Denial of Service

Published Oct 22, 2026 · Updated Oct 23, 2026 · Assigned by GitHub_M

Description

PhpSpreadsheet is a pure PHP library for reading and writing spreadsheet files. Prior to 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0, XmlScanner::scan in src/PhpSpreadsheet/Reader/Security/XmlScanner.php uses a DOCTYPE detection pattern that accounts for NUL-byte interleaving but not ISO-2022 escape sequences in XLSX XML parts. The escape sequences prevent the scanner from matching the declaration, and XML charset normalization then removes the escape bytes before parsing, exposing a valid DOCTYPE and entity definitions. Processing an attacker-controlled XLSX can therefore cause entity-expansion denial of service on supported PHP versions 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 1.30.7, 2.1.19, 2.4.8, 3.10.8, and 5.10.0.

Affected products

VendorProductAffectedFixed
PHPOffice PhpSpreadsheet < 1.30.7, >= 2.0.0, < 2.1.19, >= 2.2.0, < 2.4.8, >= 3.3.0, < 3.10.8, >= 4.0.0, < 5.10.0 —

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist phpoffice/phpspreadsheet >= 4.0.0, < 5.10.0 5.10.0 GHSA-3x94-m842-937c
Packagist phpoffice/phpspreadsheet >= 3.3.0, < 3.10.8 3.10.8 GHSA-3x94-m842-937c
Packagist phpoffice/phpspreadsheet >= 2.2.0, < 2.4.8 2.4.8 GHSA-3x94-m842-937c
Packagist phpoffice/phpspreadsheet >= 2.0.0, < 2.1.19 2.1.19 GHSA-3x94-m842-937c
Packagist phpoffice/phpspreadsheet < 1.30.7 1.30.7 GHSA-3x94-m842-937c

References