Skip to main content
← All vulnerabilities
CVE-2024-47873GHSA-JW4X-V69F-HH5W

PhpSpreadsheet XmlScanner bypass leads to XXE

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.29.4, 2.1.3, 2.3.2, 3.4.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  3. Record last updated

Affected versions

  • PHPOffice PhpSpreadsheet

    fixed in 1.29.4; From 2.0.0 · fixed in 2.1.3; From 2.2.0 · fixed in 2.3.2; From 3.3.0 · fixed in 3.4.0

  • phpoffice/phpspreadsheetPackagist

    fixed in 1.29.4

  • phpoffice/phpspreadsheetPackagist

    From 2.0.0 · fixed in 2.1.3

  • phpoffice/phpspreadsheetPackagist

    From 2.2.0 · fixed in 2.3.2

  • phpoffice/phpspreadsheetPackagist

    From 3.3.0 · fixed in 3.4.0

  • phpoffice/phpexcelPackagist

    through 1.8.2

References 4

GitHub · PHPOffice/PhpSpreadsheet

owasp.org

w3.org