### [CVE-2024-47873](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-47873) ![](https://img.shields.io/static/v1?label=Product&message=PhpSpreadsheet&color=blue) ![](https://img.shields.io/static/v1?label=Version&message=%3C%201.29.4%20&color=brightgreen) ![](https://img.shields.io/static/v1?label=Version&message=%3E%3D%202.0.0%2C%20%3C%202.1.3%20&color=brightgreen) ![](https://img.shields.io/static/v1?label=Version&message=%3E%3D%202.2.0%2C%20%3C%202.3.2%20&color=brightgreen) ![](https://img.shields.io/static/v1?label=Version&message=%3E%3D%203.3.0%2C%20%3C%203.4.0%20&color=brightgreen) ![](https://img.shields.io/static/v1?label=Version&message=0%20&color=brightgreen) ![](https://img.shields.io/static/v1?label=Version&message=2.0.0%20&color=brightgreen) ![](https://img.shields.io/static/v1?label=Version&message=2.2.0%20&color=brightgreen) ![](https://img.shields.io/static/v1?label=Version&message=3.3.0%20&color=brightgreen) ![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-611%3A%20Improper%20Restriction%20of%20XML%20External%20Entity%20Reference&color=brightgreen) ### 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. ### POC #### Reference - https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-jw4x-v69f-hh5w #### Github No PoCs found on GitHub currently.