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

CVE-2024-45060: PhpSpreadsheet has an Unauthenticated Cross-Site-Scripting (XSS) in sample file

October 7, 2024 (updated March 6, 2025)

One of the sample scripts in PhpSpreadsheet is susceptible to a cross-site scripting (XSS) vulnerability due to improper handling of input where a number is expected leading to formula injection.

References

  • github.com/PHPOffice/PhpSpreadsheet
  • github.com/PHPOffice/PhpSpreadsheet/blob/d50b8b5de7e30439fb57eae7df9ea90e79fa0f2d/samples/Basic/45_Quadratic_equation_solver.php
  • github.com/PHPOffice/PhpSpreadsheet/commit/3990173db1207767139e63d33783beafada57007
  • github.com/PHPOffice/PhpSpreadsheet/commit/bc74f3aa1d76f191c6c7c3631e286abb25c38759
  • github.com/PHPOffice/PhpSpreadsheet/commit/fb42a103f14cfce258c836b31f4a71f1fb1a9747
  • github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-v66g-p9x6-v98p
  • github.com/advisories/GHSA-v66g-p9x6-v98p
  • nvd.nist.gov/vuln/detail/CVE-2024-45060

Code Behaviors & Features

Detect and mitigate CVE-2024-45060 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 before 1.29.2, all versions starting from 2.0.0 before 2.1.1, all versions starting from 2.2.0 before 2.3.0

Fixed versions

  • 2.3.0
  • 1.29.2
  • 2.1.1

Solution

Upgrade to versions 1.29.2, 2.1.1, 2.3.0 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/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/phpspreadsheet/CVE-2024-45060.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:49 +0000.