{"id":"CVE-2026-108358","published":"2026-10-22T17:29:56Z","modified":"2026-10-23T21:08:28Z","title":"PhpSpreadsheet: XmlScanner Bypass via ISO-2022 Escape Sequences Allows XXE and Denial of Service","vendor":"PHPOffice","product":"PhpSpreadsheet","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00678,"percentile":0.4745,"provenance":"source"},"cwes":[{"id":"CWE-611","name":"Improper Restriction of XML External Entity Reference"},{"id":"CWE-776","name":"Improper Restriction of Recursive Entity References in DTDs"}],"references":[{"url":"https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-3x94-m842-937c","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/commit/299993894dce37aa3b64aa23e9a3f4bb77ab0e66","tags":["x_refsource_MISC"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/commit/89f455c133e1a7e2d4abfadc43ce29eb7450d781","tags":["x_refsource_MISC"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/commit/980b5c294493856f1a25754f1e8a1d2185b93738","tags":["x_refsource_MISC"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/commit/9a0b48622ebfe93fa48cb9bc09ce57303bb07af9","tags":["x_refsource_MISC"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/commit/da13f40e8760d599b0e8a296017d4b028b20e86c","tags":["x_refsource_MISC"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/1.30.7","tags":["x_refsource_MISC"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/2.1.19","tags":["x_refsource_MISC"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/2.4.8","tags":["x_refsource_MISC"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/3.10.8","tags":["x_refsource_MISC"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/releases/tag/5.10.0","tags":["x_refsource_MISC"]}],"priority":{"score":15.7,"factors":[{"name":"EPSS percentile","points":9.49},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"phpoffice","affectedVersions":[{"vendor":"PHPOffice","product":"PhpSpreadsheet","versions":["< 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"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-10-23T17:32:56.137020Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"phpoffice/phpspreadsheet","vulnerableRanges":[">=4.0.0, <5.10.0",">=3.3.0, <3.10.8",">=2.2.0, <2.4.8",">=2.0.0, <2.1.19","<1.30.7"],"patched":["5.10.0","3.10.8","2.4.8","2.1.19","1.30.7"],"from":["GHSA-3x94-m842-937c"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-108265","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-phpoffice-phpspreadsheet-cve-2018-19277","parents":[{"from":"CVE-2018-19277","to":"CVE-2026-108358","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/PhpSpreadsheet/Reader/Ods.php","src/PhpSpreadsheet/Reader/Xml.php"],"commits":["https://github.com/PHPOffice/PhpSpreadsheet/commit/0f8f071e24ee8b114d894ac172f77dc250e5bfa4","https://github.com/PHPOffice/PhpSpreadsheet/commit/299993894dce37aa3b64aa23e9a3f4bb77ab0e66","https://github.com/PHPOffice/PhpSpreadsheet/commit/89f455c133e1a7e2d4abfadc43ce29eb7450d781"],"basis":"shared function","functions":["listWorksheetInfo","loadIntoExisting"]}]},{"from":"CVE-2024-45048","to":"CVE-2026-108358","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/PhpSpreadsheet/Reader/Security/XmlScanner.php"],"commits":["https://github.com/PHPOffice/PhpSpreadsheet/commit/bea2d4b30f24bcc8a7712e208d1359e603b45dda","https://github.com/PHPOffice/PhpSpreadsheet/commit/299993894dce37aa3b64aa23e9a3f4bb77ab0e66","https://github.com/PHPOffice/PhpSpreadsheet/commit/89f455c133e1a7e2d4abfadc43ce29eb7450d781"],"basis":"shared function","functions":["toUtf8"]}]},{"from":"CVE-2024-45293","to":"CVE-2026-108358","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/PhpSpreadsheet/Reader/Security/XmlScanner.php"],"commits":["https://github.com/PHPOffice/PhpSpreadsheet/commit/3bcd51826b7f089d1641e756c83030c30c3bdb0c","https://github.com/PHPOffice/PhpSpreadsheet/commit/7d6cb09f6e8204f65e6dd5a0490f7f45f44bb331","https://github.com/PHPOffice/PhpSpreadsheet/commit/299993894dce37aa3b64aa23e9a3f4bb77ab0e66","https://github.com/PHPOffice/PhpSpreadsheet/commit/89f455c133e1a7e2d4abfadc43ce29eb7450d781"],"basis":"shared function","functions":["toUtf8"]}]},{"from":"CVE-2025-23210","to":"CVE-2026-108358","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/PhpSpreadsheet/Worksheet/Drawing.php"],"commits":["https://github.com/PHPOffice/PhpSpreadsheet/commit/cde2926a9e2baf146783f8fd1771bbed7d1dc7b3","https://github.com/PHPOffice/PhpSpreadsheet/commit/299993894dce37aa3b64aa23e9a3f4bb77ab0e66","https://github.com/PHPOffice/PhpSpreadsheet/commit/89f455c133e1a7e2d4abfadc43ce29eb7450d781"],"basis":"shared function","functions":["setPath"]}]}],"packageHistory":[{"cve":"CVE-2026-59932","published":"2026-07-28","fixed":"5.8.1","kev":false},{"cve":"CVE-2026-59933","published":"2026-07-28","fixed":"5.8.1","kev":false,"link":{"from":"CVE-2026-59933","to":"CVE-2026-108358","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:phpoffice/phpspreadsheet","fromFixed":"2.4.7","toFixed":"2.4.8","daysApart":86}]}},{"cve":"CVE-2026-108357","published":"2026-10-22","fixed":"5.10.0","kev":false},{"cve":"CVE-2026-108358","published":"2026-10-22","fixed":"5.10.0","kev":false},{"cve":"CVE-2026-108359","published":"2026-10-22","fixed":"5.10.0","kev":false},{"cve":"CVE-2026-108360","published":"2026-10-22","fixed":"5.10.0","kev":false}],"package":"Packagist:phpoffice/phpspreadsheet"}}