{"id":"CVE-2024-47873","summary":"PhpSpreadsheet XmlScanner bypass leads to XXE","details":"PhpSpreadsheet is a PHP library for reading and writing spreadsheet files. The XmlScanner class has a scan method which should prevent XXE attacks. However, prior to versions 1.9.4, 2.1.3, 2.3.2, and 3.4.0, the regexes used in the `scan` method and the findCharSet method can be bypassed by using UCS-4 and encoding guessing. An attacker can bypass the sanitizer and achieve an XML external entity attack. Versions 1.9.4, 2.1.3, 2.3.2, and 3.4.0 fix the issue.","aliases":["GHSA-jw4x-v69f-hh5w"],"modified":"2026-03-01T02:49:18.083437Z","published":"2024-11-18T17:03:00.366Z","database_specific":{"cna_assigner":"GitHub_M","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47873.json","cwe_ids":["CWE-611"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47873.json"},{"type":"WEB","url":"https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php"},{"type":"ADVISORY","url":"https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-jw4x-v69f-hh5w"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47873"},{"type":"WEB","url":"https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing"},{"type":"WEB","url":"https://www.w3.org/TR/xml/#sec-guessing-no-ext-info"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/phpoffice/phpspreadsheet","events":[{"introduced":"0"},{"fixed":"7ca7e325dca3adb6a598385aab81f527b8d6c75d"}],"database_specific":{"versions":[{"introduced":"0"},{"fixed":"1.29.4"}]}},{"type":"GIT","repo":"https://github.com/phpoffice/phpspreadsheet","events":[{"introduced":"4a77798f835119754961a97714f135826a323caa"},{"fixed":"fbd9a63e2f2ab6d6a0a3cad27ec14cc7650ee574"}],"database_specific":{"versions":[{"introduced":"2.0.0"},{"fixed":"2.1.3"}]}},{"type":"GIT","repo":"https://github.com/phpoffice/phpspreadsheet","events":[{"introduced":"b0993b7e4d9c860133365d115b176bc6e0f57022"},{"fixed":"08d4e08cf0c7e6182750cef7958b860b8c7f10ad"}],"database_specific":{"versions":[{"introduced":"2.2.0"},{"fixed":"2.3.2"}]}},{"type":"GIT","repo":"https://github.com/phpoffice/phpspreadsheet","events":[{"introduced":"87ddd21eb0b6b7ad20a11d314348ef307475f547"},{"fixed":"eec07c20b51cc785295a6feef81ada7feda755e7"}],"database_specific":{"versions":[{"introduced":"3.3.0"},{"fixed":"3.4.0"}]}}],"versions":["1.0.0","1.0.0-beta","1.0.0-beta2","1.1.0","1.10.0","1.10.1","1.11.0","1.12.0","1.13.0","1.14.0","1.14.1","1.15.0","1.16.0","1.17.0","1.17.1","1.18.0","1.19.0","1.2.0","1.2.1","1.20.0","1.21.0","1.22.0","1.23.0","1.24.0","1.24.1","1.25.0","1.25.1","1.25.2","1.27.0","1.28.0","1.29.0","1.29.1","1.29.2","1.3.0","1.3.1","1.4.0","1.4.1","1.5.0","1.5.1","1.5.2","1.6.0","1.7.0","1.8.0","1.8.1","1.8.2","1.9.0","2.0.0","2.1.0","2.1.1","2.2.0","2.2.1","2.2.2","2.3.0","3.3.0","phpexcel-last-cherry-picked-commit","phpexcel-last-release-1.8.1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-47873.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"}]}