{"id":"CVE-2026-108357","published":"2026-10-22T17:38:16Z","modified":"2026-10-23T21:08:17Z","title":"PhpSpreadsheet: XmlScanner Bypass via Double-Encoded unentity() TOCTOU 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. 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.","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.00496,"percentile":0.35446,"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-rxj4-h86g-25gc","tags":["x_refsource_CONFIRM"]},{"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/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":13.2,"factors":[{"name":"EPSS percentile","points":7.09},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"phpoffice","affectedVersions":[{"vendor":"PHPOffice","product":"PhpSpreadsheet","versions":[">= 3.3.0, < 3.10.8",">= 4.0.0, < 5.10.0"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-10-23T17:32:57.479788Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"phpoffice/phpspreadsheet","vulnerableRanges":[">=4.0.0, <5.10.0",">=3.3.0, <3.10.8"],"patched":["5.10.0","3.10.8"],"from":["GHSA-rxj4-h86g-25gc"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-108242","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-phpoffice-phpspreadsheet-cve-2018-19277","parents":[{"from":"CVE-2018-19277","to":"CVE-2026-108357","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/89f455c133e1a7e2d4abfadc43ce29eb7450d781","https://github.com/PHPOffice/PhpSpreadsheet/commit/980b5c294493856f1a25754f1e8a1d2185b93738"],"basis":"shared function","functions":["listWorksheetInfo","loadIntoExisting"]}]},{"from":"CVE-2024-45048","to":"CVE-2026-108357","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/89f455c133e1a7e2d4abfadc43ce29eb7450d781","https://github.com/PHPOffice/PhpSpreadsheet/commit/980b5c294493856f1a25754f1e8a1d2185b93738"],"basis":"shared function","functions":["toUtf8"]}]},{"from":"CVE-2024-45293","to":"CVE-2026-108357","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/89f455c133e1a7e2d4abfadc43ce29eb7450d781","https://github.com/PHPOffice/PhpSpreadsheet/commit/980b5c294493856f1a25754f1e8a1d2185b93738"],"basis":"shared function","functions":["toUtf8"]}]},{"from":"CVE-2025-23210","to":"CVE-2026-108357","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/89f455c133e1a7e2d4abfadc43ce29eb7450d781","https://github.com/PHPOffice/PhpSpreadsheet/commit/980b5c294493856f1a25754f1e8a1d2185b93738"],"basis":"shared function","functions":["setPath"]}]}],"children":[{"from":"CVE-2026-108357","to":"CVE-2026-108359","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/PhpSpreadsheet/Reader/Ods.php"],"commits":["https://github.com/PHPOffice/PhpSpreadsheet/commit/89f455c133e1a7e2d4abfadc43ce29eb7450d781","https://github.com/PHPOffice/PhpSpreadsheet/commit/980b5c294493856f1a25754f1e8a1d2185b93738","https://github.com/PHPOffice/PhpSpreadsheet/commit/299993894dce37aa3b64aa23e9a3f4bb77ab0e66","https://github.com/PHPOffice/PhpSpreadsheet/commit/2de29384aa11223ee08136c0e6a9e9981bc1a2eb"],"basis":"shared function","functions":["listWorksheetInfo","loadIntoExisting","processMergedCells","setPath","toUtf8"]}]},{"from":"CVE-2026-108357","to":"CVE-2026-108360","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/PhpSpreadsheet/Reader/Ods.php"],"commits":["https://github.com/PHPOffice/PhpSpreadsheet/commit/89f455c133e1a7e2d4abfadc43ce29eb7450d781","https://github.com/PHPOffice/PhpSpreadsheet/commit/980b5c294493856f1a25754f1e8a1d2185b93738","https://github.com/PHPOffice/PhpSpreadsheet/commit/299993894dce37aa3b64aa23e9a3f4bb77ab0e66","https://github.com/PHPOffice/PhpSpreadsheet/commit/94590951d76a250a5fc1ecf69a0b3f7439a9af49"],"basis":"shared function","functions":["listWorksheetInfo","loadIntoExisting","processMergedCells","setPath","toUtf8"]}]}]}}