Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. phpoffice/phpexcel
  4. ›
  5. CVE-2024-45046

CVE-2024-45046: PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via style information

August 29, 2024 (updated March 6, 2025)

\PhpOffice\PhpSpreadsheet\Writer\Html doesn’t sanitize spreadsheet styling information such as font names, allowing an attacker to inject arbitrary JavaScript on the page.

References

  • github.com/PHPOffice/PhpSpreadsheet
  • github.com/PHPOffice/PhpSpreadsheet/commit/f7cf378faed2e11cf4825bf8bafea4922ae44667
  • github.com/PHPOffice/PhpSpreadsheet/pull/3957
  • github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-wgmf-q9vr-vww6
  • github.com/advisories/GHSA-wgmf-q9vr-vww6
  • nvd.nist.gov/vuln/detail/CVE-2024-45046

Code Behaviors & Features

Detect and mitigate CVE-2024-45046 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 1.8.2

Solution

Unfortunately, there is no solution available yet.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

packagist/phpoffice/phpexcel/CVE-2024-45046.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:26 +0000.