# GHSA-44jg-mv3h-wj6g: solspace/craft-freeform Vulnerable to XSS in `PhpSpreadsheet` HTML Writer Due to Unsanitized Styling Data

- Severity: Low (CVSS:4.0, scored by GitHub) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-01-15T22:40:42.000Z
- Modified: 2026-02-03T03:17:27.874Z
- Weaknesses: CWE-79

## Description

### Summary
_Short summary of the problem. Make the impact and severity as clear as possible. For example: An unsafe deserialization vulnerability allows any unauthenticated user to execute arbitrary code on the server._

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

### Details
_Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer._

See https://github.com/advisories/GHSA-wgmf-q9vr-vww6

### PoC
_Complete instructions, including specific configuration details, to reproduce the 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](https://github.com/PHPOffice/PhpSpreadsheet/files/15212797/book.xlsx)

Open index.php in a web browser. An alert should be displayed.

### Impact
_What kind of vulnerability is it? Who is impacted?_

Full takeover of the session of users viewing spreadsheet files as HTML.

(As written by GitHub Advisory Database.)

## Affected

- solspace/craft-freeform (Packagist): before 4.1.23

## References

- <https://github.com/PHPOffice/PhpSpreadsheet/security/advisories/GHSA-wgmf-q9vr-vww6> (web)
- <https://github.com/solspace/craft-freeform/security/advisories/GHSA-44jg-mv3h-wj6g> (web)
- <https://github.com/solspace/craft-freeform> (package)
- <https://github.com/solspace/craft-freeform/releases/tag/v4.1.23> (web)

## Sources

- GitHub Advisory Database: [GHSA-44jg-mv3h-wj6g](https://github.com/advisories/GHSA-44jg-mv3h-wj6g), CC-BY-4.0, modified 2026-02-03

---

Page: https://cve.day/GHSA-44jg-mv3h-wj6g · Whole record: https://cve.day/GHSA-44jg-mv3h-wj6g.json · Rebuilt by cve.day 2026-11-25T22:56:30.981Z
