Loading advisory.
Loading advisory.
PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via style information
\PhpOffice\PhpSpreadsheet\Writer\Html doesn't sanitize spreadsheet styling information such as font names, allowing an attacker to inject arbitrary JavaScript on the page.
Published 2024-08-28 20:41 UTC · Modified 2025-03-06 18:36 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| phpoffice/phpspreadsheet | Packagist | >= 2.0.0, < 2.1.0 < 1.29.1 versions 2.0.0, 1.0.0, 1.0.0-beta, 1.0.0-beta2, 1.1.0, 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.13.0, 1.14.0, 1.14.1, 1.15.0, 1.16.0, 1.17.0, 1.17.1, 1.18.0, 1.19.0, 1.2.0, 1.2.1 and 27 more | 2.1.0, 1.29.1 | composer require 'phpoffice/phpspreadsheet:>=2.1.0'composer require 'phpoffice/phpspreadsheet:>=1.29.1' |
| phpoffice/phpexcel | Packagist | <= 1.8.2 versions 1.7.9, 1.7.9-rc1, 1.8.0, 1.8.0rc1, 1.8.0rc2, 1.8.0rc3, 1.8.0rc4, 1.8.1, 1.8.2 | No patch yet | No command until a fix exists. |
\PhpOffice\PhpSpreadsheet\Writer\Html doesn't sanitize spreadsheet styling information such as font names, allowing an attacker to inject arbitrary JavaScript on the page.
Example target script:
<?php
require 'vendor/autoload.php';
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader("Xlsx");
$spreadsheet = $reader->load(__DIR__ . '/book.xlsx');
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Html($spreadsheet);
print($writer->generateHTMLAll());Save this file in the same directory: book.xlsx
Open index.php in a web browser. An alert should be displayed.
Full takeover of the session of users viewing spreadsheet files as HTML.
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.004 on 2026-11-24 to 0.007 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.004 | first score | v2026.06.15 |
| 2026-11-26 | 0.007 | 0.004 | v2026.06.15 |