Skip to main content
← All vulnerabilities
CVE-2024-45046GHSA-WGMF-Q9VR-VWW6

PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via style information

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.1.0, 1.29.1
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

PHPSpreadsheet is a pure PHP library for reading and writing spreadsheet files. In affected versions `\PhpOffice\PhpSpreadsheet\Writer\Html` doesn't sanitize spreadsheet styling information such as font names, allowing an attacker to inject arbitrary JavaScript on the page. As a result an attacker may used a crafted spreadsheet to fully takeover a session of a user viewing spreadsheet files as HTML. This issue has been addressed in release version 2.1.0. All users are advised to upgrade. There are no known workarounds for this vulnerability.

Timeline

  1. CVE published
  2. CISA SSVC assessment

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

  3. Record last updated

Affected versions

  • PHPOffice PhpSpreadsheet

    fixed in 2.1.0

  • phpoffice/phpspreadsheetPackagist

    From 2.0.0 · fixed in 2.1.0

  • phpoffice/phpspreadsheetPackagist

    fixed in 1.29.1

  • phpoffice/phpexcelPackagist

    through 1.8.2

References 3

GitHub · PHPOffice/PhpSpreadsheet