{"id":"CVE-2024-47873","state":"PUBLISHED","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 attack. Versions 1.9.4, 2.1.3, 2.3.2, and 3.4.0 fix the issue.","publishedAt":"2024-11-18T17:03:00.366Z","updatedAt":"2024-11-18T18:28:36.292Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["PHPOffice PhpSpreadsheet"],"affected":[{"vendor":"PHPOffice","product":"PhpSpreadsheet","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"}]}],"references":["https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-jw4x-v69f-hh5w","https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php","https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing","https://www.w3.org/TR/xml/#sec-guessing-no-ext-info"],"weaknesses":["CWE-611"],"ingestedAt":"2026-10-29T20:07:56.516Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/47xxx/CVE-2024-47873.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-47873","state":"PUBLISHED","datePublished":"2024-11-18T17:03:00.366Z","dateUpdated":"2024-11-18T18:28:36.292Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2024-10-04T16:00:09.629Z"},"containers":{"cna":{"title":"PhpSpreadsheet XmlScanner bypass leads to XXE","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"PHPOffice","product":"PhpSpreadsheet","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"}]}],"references":[{"url":"https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-jw4x-v69f-hh5w","name":"https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-jw4x-v69f-hh5w","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php","name":"https://github.com/PHPOffice/PhpSpreadsheet/blob/39fc51309181e82593b06e2fa8e45ef8333a0335/src/PhpSpreadsheet/Reader/Security/XmlScanner.php","tags":["x_refsource_MISC"]},{"url":"https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing","name":"https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing","tags":["x_refsource_MISC"]},{"url":"https://www.w3.org/TR/xml/#sec-guessing-no-ext-info","name":"https://www.w3.org/TR/xml/#sec-guessing-no-ext-info","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-611","lang":"en","description":"CWE-611: Improper Restriction of XML External Entity Reference","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2024-11-18T17:03:00.366Z"},"source":{"advisory":"GHSA-jw4x-v69f-hh5w","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"phpoffice","product":"phpspreadsheet","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"1.29.4","versionType":"custom"},{"version":"2.0.0","status":"affected","lessThan":"2.1.3","versionType":"custom"},{"version":"2.2.0","status":"affected","lessThan":"2.3.2","versionType":"custom"},{"version":"3.3.0","status":"affected","lessThan":"3.4.0","versionType":"custom"}],"cpes":["cpe:2.3:a:phpoffice:phpspreadsheet:*:*:*:*:*:*:*:*"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-11-18T18:28:33.862619Z","id":"CVE-2024-47873","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-18T18:28:36.292Z"}}]}}}