PhpSpreadsheetでXXE攻撃や過負荷を招く不正なXLSXを処理される
Summary
PhpSpreadsheetのXML検査処理に不備があり、細工されたXLSXファイルを読み込むとサービス妨害や、PHP 8.0より前の環境などでのローカルファイル参照、SSRFが起きるおそれがあります。影響を受けるのは1.30.7未満、2.1.19未満、2.4.8未満、3.10.8未満、5.10.0未満の版です。修正版は1.30.7、2.1.19、2.4.8、3.10.8、5.10.0です。利用中の版を確認し、修正版へ更新してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
PhpSpreadsheetのXML検査処理に不備があり、細工されたXLSXファイルを読み込むとサービス妨害や、PHP 8.0より前の環境などでのローカルファイル参照、SSRFが起きるおそれがあります。影響を受けるのは1.30.7未満、2.1.19未満、2.4.8未満、3.10.8未満、5.10.0未満の版です。修正版は1.30.7、2.1.19、2.4.8、3.10.8、5.10.0です。利用中の版を確認し、修正版へ更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| PHPOfficePhpSpreadsheet | — | Not listed |
| composerphpoffice/phpspreadsheet |
< 1.30.7→ 1.30.7 |
1.30.7 |
| Packagistphpoffice/phpspreadsheet |
< 1.30.7→ 1.30.7 |
1.30.7 |
Original description The description as published by the source.
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.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- patch github.com
- patch github.com
- patch github.com
- patch github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com