# GHSA-vf6x-59hh-332f: Formwork has a cross-site scripting (XSS) vulnerability in Site title

> Admins can inject JavaScript into the site title, causing XSS attacks and potential denial of service for all users.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 1 Mar 2025

## What is GHSA-vf6x-59hh-332f?

GHSA-vf6x-59hh-332f is a cross-site scripting vulnerability in getformwork/formwork, published on 1 Mar 2025. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

### Summary

The site title field at /panel/options/site/allows embedding JS tags, which can be used to attack all members of the system. This is a widespread attack and can cause significant damage if there is a considerable number of users.

### Impact

The attack is widespread, leveraging what XSS can do. This will undoubtedly impact system availability.

### Patches
- [**Formwork 2.x** (aa3e9c6)](https://github.com/getformwork/formwork/commit/aa3e9c684035d9e8495169fde7c57d97faa3f9a2) escapes site title from panel header navigation.

### Details

By embedding "<!--", the source code can be rendered non-functional, significantly impacting system availability. However, the attacker would need admin privileges, making the attack more difficult to execute.

## Which versions are affected by GHSA-vf6x-59hh-332f?

2 open source packages ship an affected version, including getformwork/formwork.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `getformwork/formwork` | Packagist | From 2.0.0-beta.3 | 2.0.0-beta.4 |
| `getformwork/formwork` | Packagist | From 2.0.0-beta.3 | 2.0.0-beta.4 |

## How do I fix GHSA-vf6x-59hh-332f?

Upgrade getformwork/formwork to 2.0.0-beta.4 or later.

## Is GHSA-vf6x-59hh-332f being exploited?

There is no known exploitation of GHSA-vf6x-59hh-332f in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-vf6x-59hh-332f and fix it if it is affected.

What it is: GHSA-vf6x-59hh-332f is a cross-site scripting vulnerability in getformwork/formwork, published on 1 Mar 2025. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-vf6x-59hh-332f in the wild and no public exploit code.

Affected packages and fixed versions:
- getformwork/formwork (Packagist): affected from 2.0.0-beta.3; fixed in 2.0.0-beta.4
- getformwork/formwork (Packagist): affected from 2.0.0-beta.3; fixed in 2.0.0-beta.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-vf6x-59hh-332f/ (Markdown: https://insights.sbomify.com/GHSA-vf6x-59hh-332f/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-vf6x-59hh-332f

---
From sbomify Insights: https://insights.sbomify.com/GHSA-vf6x-59hh-332f/
Summaries are generated and may contain mistakes; the official description above is the record.
