Moderate severityNVD Advisory· Published Aug 28, 2024· Updated Aug 29, 2024
PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via style information
CVE-2024-45046
Description
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
phpoffice/phpspreadsheetPackagist | >= 2.0.0, < 2.1.0 | 2.1.0 |
phpoffice/phpspreadsheetPackagist | < 1.29.1 | 1.29.1 |
phpoffice/phpexcelPackagist | <= 1.8.2 | — |
Affected products
3- ghsa-coords2 versions
<= 1.8.2+ 1 more
- (no CPE)range: <= 1.8.2
- (no CPE)range: >= 2.0.0, < 2.1.0
- Range: < 2.1.0
Patches
Vulnerability mechanics
References
5- github.com/advisories/GHSA-wgmf-q9vr-vww6ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-45046ghsaADVISORY
- github.com/PHPOffice/PhpSpreadsheet/commit/f7cf378faed2e11cf4825bf8bafea4922ae44667ghsax_refsource_MISCWEB
- github.com/PHPOffice/PhpSpreadsheet/pull/3957ghsax_refsource_MISCWEB
- github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-wgmf-q9vr-vww6ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.