Vulnerabilities

Vulnerability · CVE-2026-108358

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

Published Oct 22, 2026 · catalog updated Oct 27, 2026 · PHPOffice PhpSpreadsheet

Last checked Nov 5, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2026-108358. EPSS is 0.63%. Act only if a listed version of PHPOffice PhpSpreadsheet is installed.

Gaps on this record

  • No vendor fix or required action is stored. Compare the linked advisory before you change production.

Same product and reporting

Severity
High8.8
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.63%
Remediation
Version ranges on file
Affected products
Packagist phpoffice/phpspreadsheet · composer phpoffice · composer phpoffice/phpspreadsheet · vendor PHPOffice PhpSpreadsheet

### Summary PhpSpreadsheet's uses a regex pattern that only accounts for NULL byte (0x00) interleaving when detecting . ISO-2022 escape sequences (0x1B bytes) inserted between the characters of the pattern break the regex match entirely, allowing DOCTYPE declarations with entity definitions to pass through undetected. This enables Denial of Service via quadratic entity expansion on **all PHP versions**, and XXE/SSRF on PHP < 8.0 or when is used. Any application using PhpSpreadsheet to process user-uploaded XLSX files is affected. ### Details The vulnerability exists in , method , lines 87–100. The scanner builds a regex pattern that only handles NULL byte interleaving. ISO-2022 escape sequences (e.g., for ISO-2022-JP) inserted between each character of break the regex because it only expects optional between characters. The XLSX reader extracts XML parts from the ZIP archive and passes each through before . The XML parser strips the ESC bytes during charset normalization, producing a valid declaration that the scanner never detected. Seven ISO-2022 encoding variants bypass the scanner: - ISO-2022-JP ( ) - ISO-2022-JP-2 ( ) - ISO-2022-KR ( ) - ISO-2022-CN ( ) - ISO-2022-CN-EXT ( ) - ISO-2022-JP-2004 ( ) - ISO-2022-JP-MS ( ) Internal entity expansion (quadratic blowup) is **not blocked** by libxml2 2.9+ defaults, making this directly exploitable for DoS on all modern PHP versions. ### PoC Save the following as in a directory with PhpSpreadsheet installed via Composer: Run: **Expected result:** The scanner does not detect the DOCTYPE. The XLSX loads successfully. Internal entities expand, consuming ~45 MB of memory from a ~2 KB file. **Tested on:** PhpSpreadsheet 5.9.0, PHP 8.5.3, libxml2 2.9.13. ### Impact | Attack | PHP < 8.0 / libxml2 < 2.9 | PHP 8.x / libxml2 2.9+ | |--------|---------------------------|------------------------| | Denial of Service (quadratic blowup) | **Exploitable** | **Exploitable** | | Local file read via SYSTEM entity | **Exploitable** | Block

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • Packagist phpoffice/phpspreadsheet0 → 1.30.7
  • Packagist phpoffice/phpspreadsheet2.0.0 → 2.1.19
  • Packagist phpoffice/phpspreadsheet2.2.0 → 2.4.8
  • Packagist phpoffice/phpspreadsheet3.3.0 → 3.10.8
  • Packagist phpoffice/phpspreadsheet4.0.0 → 5.10.0
  • composer phpofficeversion unspecified
  • composer phpoffice/phpspreadsheet<= 1.30.6
  • composer phpoffice/phpspreadsheet>= 2.0.0, <= 2.1.18
  • composer phpoffice/phpspreadsheet>= 2.2.0, <= 2.4.7
  • composer phpoffice/phpspreadsheet>= 3.3.0, <= 3.10.7
  • composer phpoffice/phpspreadsheet>= 4.0.0, <= 5.9.0
  • vendor PHPOffice PhpSpreadsheetversion unspecified

How to fix CVE-2026-108358

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2026-108358. EPSS is 0.63%. Act only if a listed version of PHPOffice PhpSpreadsheet is installed.

Which versions are affected?

Compare what you have installed with 0 → 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, <= 1.30.6. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-611: XML External Entity (XXE); CWE-776. EPSS 0.63%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 27, 2026 · GitHub Advisory Database

    Detected

    ### Summary PhpSpreadsheet's uses a regex pattern that only accounts for NULL byte (0x00) interleaving when detecting . ISO-2022 escape sequences (0x1B bytes) inserted between the characters of the pattern break the regex match entirely, allowing DOCTYPE declarations with entity definitions to pass through undetected. This enables Denial of Service via quadratic entity expansion on **all PHP versi

  2. Oct 27, 2026 · GitHub Advisory Database

    Updated

    ### Summary PhpSpreadsheet's uses a regex pattern that only accounts for NULL byte (0x00) interleaving when detecting . ISO-2022 escape sequences (0x1B bytes) inserted between the characters of the pattern break the regex match entirely, allowing DOCTYPE declarations with entity definitions to pass through undetected. This enables Denial of Service via quadratic entity expansion on **all PHP versi

  3. Oct 27, 2026 · GitHub Advisory Database

    Fix available

    phpoffice/phpspreadsheet fixed in 5.10.0; phpoffice/phpspreadsheet fixed in 3.10.8; phpoffice/phpspreadsheet fixed in 2.4.8; phpoffice/phpspreadsheet fixed in 2.1.19

  4. Oct 27, 2026 · GitHub Advisory Database

    Fix available

    phpoffice/phpspreadsheet fixed in 5.10.0

  5. Oct 27, 2026 · GitHub Advisory Database

    Fix available

    phpoffice/phpspreadsheet fixed in 3.10.8

  6. Oct 27, 2026 · GitHub Advisory Database

    Fix available

    phpoffice/phpspreadsheet fixed in 2.4.8

  7. Oct 27, 2026 · GitHub Advisory Database

    Fix available

    phpoffice/phpspreadsheet fixed in 2.1.19

  8. Oct 27, 2026 · GitHub Advisory Database

    Fix available

    phpoffice/phpspreadsheet fixed in 1.30.7

  9. Oct 27, 2026 · GitHub Advisory Database

    Updated

    ### Summary PhpSpreadsheet's uses a regex pattern that only accounts for NULL byte (0x00) interleaving when detecting . ISO-2022 escape sequences (0x1B bytes) inserted between the characters of the pattern break the regex match entirely, allowing DOCTYPE declarations with entity definitions to pass through undetected. This enables Denial of Service via quadratic entity expansion on **all PHP versi

Sources

  • CVE.orgVulnerability recordCVE-2026-108358

    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 n

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2026-108358

    30-day exploitation probability 0.63%

    first.org
  • GitHub Advisory DatabasePackage advisoryGHSA-3x94-m842-937c

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

    github.com
  • GitLab Advisory DatabasePackage advisoryCVE-2026-108358

    PhpSpreadsheet's XmlScanner::scan() uses a regex pattern that only accounts for NULL byte (0x00) interleaving when detecting <!DOCTYPE. ISO-2022 escape sequences (0x1B bytes) inserted between the characters of the pattern break the regex match entirely, allowing DOCTYPE declarations with entity definitions to pass through undetected. This enables Denial of Service via quadratic entity expansion on

    advisories.gitlab.com
  • OpenSSF OSV / OSV ScannerPackage advisoryGHSA-3x94-m842-937c

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

    osv.dev

References

Freshness

Last verified in this catalog Nov 5, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • FIRST EPSSNov 5, 2026
  • GitLab Advisory DatabaseOct 28, 2026
  • GitHub Advisory DatabaseOct 28, 2026
  • OpenSSF OSV / OSV ScannerOct 28, 2026
  • CVE.orgOct 27, 2026