PhpSpreadsheet: XmlScanner Bypass via ISO-2022 Escape Sequences Allows XXE and Denial of Service
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 1.30.7, 2.1.19, 2.4.8, 3.10.8, 5.10.0
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: yes
- Technical impact: partial
Summary
PhpSpreadsheet, a PHP library for reading and writing spreadsheet files, is affected when it processes XLSX files. A specially crafted spreadsheet can bypass its XML security checks and cause a denial of service through entity expansion, or allow local file access or server-side request forgery on older PHP versions or when a specific libxml option is enabled.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original 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.
Timeline
- CVE published
- First seen by cve.now
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: partial
- Record last updated
Affected versions
- PHPOffice PhpSpreadsheet
fixed in 1.30.7; From 2.0.0 · fixed in 2.1.19; From 2.2.0 · fixed in 2.4.8; From 3.3.0 · fixed in 3.10.8; From 4.0.0 · fixed in 5.10.0
- phpoffice/phpspreadsheetPackagist
From 4.0.0 · fixed in 5.10.0
- phpoffice/phpspreadsheetPackagist
From 3.3.0 · fixed in 3.10.8
- phpoffice/phpspreadsheetPackagist
From 2.2.0 · fixed in 2.4.8
- phpoffice/phpspreadsheetPackagist
From 2.0.0 · fixed in 2.1.19
- phpoffice/phpspreadsheetPackagist
fixed in 1.30.7