{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-47873","id":"CVE-2024-47873","title":"PhpSpreadsheet XmlScanner bypass leads to XXE","description":"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 at","descriptionLong":"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.","published":"2024-11-18T17:03:00.366Z","updated":"2026-10-28T02:31:14.379178336Z","reserved":"2024-10-04T16:00:09.629Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"github.com"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"NVD"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","rating":"high","source":"GitHub"}],"rating":"high","products":["PHPOffice PhpSpreadsheet"],"affectedProducts":[{"vendor":"PHPOffice","product":"PhpSpreadsheet","defaultStatus":null,"versions":[{"version":"< 1.29.4","status":"affected"},{"version":">= 2.0.0, < 2.1.3","status":"affected"},{"version":">= 2.2.0, < 2.3.2","status":"affected"},{"version":">= 3.3.0, < 3.4.0","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"phpoffice/phpspreadsheet","purl":"pkg:composer/phpoffice/phpspreadsheet","ranges":["<1.29.4",">=2.0.0 <2.1.3",">=2.2.0 <2.3.2",">=3.3.0 <3.4.0"],"fixed":["1.29.4","2.1.3","2.3.2","3.4.0"],"advisory":"GHSA-jw4x-v69f-hh5w"},{"ecosystem":"Packagist","name":"phpoffice/phpexcel","purl":"pkg:composer/phpoffice/phpexcel","ranges":["<=1.8.2"],"fixed":[],"advisory":"GHSA-jw4x-v69f-hh5w"}],"cwes":["CWE-611"],"aliases":["GHSA-jw4x-v69f-hh5w"],"references":[{"url":"https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-jw4x-v69f-hh5w","tags":["x_refsource_CONFIRM","Exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php","tags":["x_refsource_MISC","Product","web"]},{"url":"https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing","tags":["x_refsource_MISC","Not Applicable","web"]},{"url":"https://www.w3.org/TR/xml/#sec-guessing-no-ext-info","tags":["x_refsource_MISC","Technical Description","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47873.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47873","tags":["advisory"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet","tags":["package"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial"},"epss":0.0076,"epssPercentile":0.56007,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-47873","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47873","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-47873","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-jw4x-v69f-hh5w","ok":true,"note":"GHSA-jw4x-v69f-hh5w"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-47873","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}