Loading advisory.
Loading advisory.
PhpSpreadsheet HTML writer is vulnerable to Cross-Site Scripting via JavaScript hyperlinks
\PhpOffice\PhpSpreadsheet\Writer\Html does not sanitize "javascript:" URLs from hyperlink href attributes, resulting in a Cross-Site Scripting vulnerability.
Published 2024-10-07 15:58 UTC · Modified 2025-03-06 18:37 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.2.0, < 2.3.0 < 1.29.2 >= 2.0.0, < 2.1.1 versions 2.2.0, 2.2.1, 2.2.2, 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 and 32 more | 2.3.0, 1.29.2, 2.1.1 | composer require 'phpoffice/phpspreadsheet:>=2.3.0'composer require 'phpoffice/phpspreadsheet:>=1.29.2'composer require 'phpoffice/phpspreadsheet:>=2.1.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 does not sanitize "javascript:" URLs from hyperlink href attributes, resulting in a Cross-Site Scripting vulnerability.
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 and click on both links. The first demonstrates the vulnerability in a regular hyperlink and the second in a HYPERLINK() formula.
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.003 on 2026-11-24 to 0.005 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.003 | first score | v2026.06.15 |
| 2026-11-26 | 0.005 | 0.003 | v2026.06.15 |