GHSA-44jg-mv3h-wj6g — solspace/craft-freeform
GHSA-44jg-mv3h-wj6g is a remote code execution vulnerability in solspace/craft-freeform. A fix is available for solspace/craft-freeform — see the affected versions and patch details below.
solspace/craft-freeform Vulnerable to XSS in `PhpSpreadsheet` HTML Writer Due to Unsanitized Styling Data
Real-World Exposure
solspace/craft-freeformReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
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:
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | solspace/craft-freeform | all versions | 4.1.23composer require solspace/craft-freeform:^4.1.23 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for solspace/craft-freeform, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update solspace/craft-freeform to 4.1.23 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-44jg-mv3h-wj6g is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-44jg-mv3h-wj6g can be triaged on real exposure rather than presence alone.
Tailored to GHSA-44jg-mv3h-wj6g. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-44jg-mv3h-wj6g in your dependencies?
O3 Security finds GHSA-44jg-mv3h-wj6g across Packagist dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.