Low

solspace/craft-freeform Vulnerable to XSS in `PhpSpreadsheet` HTML Writer Due to Unsanitized Styling Data

  • Disclosed: 15.01.2026
  • Updated: 11.10.2026 10:22

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
<?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.

Impact

What kind of vulnerability is it? Who is impacted?

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

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package solspace/craft-freeform < 4.1.23 4.1.23

References

CVSS score -
CVSS vector
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
Weakness (CWE)
CWE-79
Platform
Composer
Package
solspace/craft-freeform
Disclosed
15.01.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-44jg-mv3h-wj6g - CC BY 4.0

Vulnerability history: solspace/craft-freeform

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
6
First → latest
08.2025 09.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • Medium 1
  • Low 4

Disclosures per year

  1. 2025: 1
  2. 2026: 5
  1. Medium · 5.3 CVE-2026-73858 >= 5.0.0, < 5.10.14 5.10.14
  2. Low ghsa-rwr8-xrpw-9qf5 < 4.1.22, >= 5.0.0-beta.1, < 5.5.9 4.1.22, 5.5.9
  3. solspace/craft-freeform Vulnerable to XSS in `PhpSpreadsheet` HTML Writer Due to Unsanitized Styling Data this entry
    Low ghsa-44jg-mv3h-wj6g < 4.1.23 4.1.23
  4. Low ghsa-58q2-9x27-h2jm < 4.1.30 4.1.30

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.