CVE-2024-37160: Formwork Package Suffers from Stored Cross-Site Scripting (XSS) Vulnerability

getformwork/formwork Updated 02 Oct 2025

Summary

07/06/2024
Yes i
Moderate
4.8

CVE-2024-37160: Cross-site scripting (XSS) vulnerability in Description metadata. Affects getformwork/formwork across 2 version ranges.

< 1.13.1 >= 2.0.0-beta.1, < 2.0.0-beta.2

Fixed in 1.13.1 or 2.0.0-beta.2, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Formwork is an open-source content management system designed for simplicity and flexibility. It allows users to create and manage websites with ease, utilizing a flat-file architecture. However, it has been identified that the package is vulnerable to a Stored Cross-Site Scripting (XSS) attack, which can be exploited by attackers to inject malicious scripts into the website's HTML, affecting all users who visit the site.

Vulnerability Detail

The vulnerability arises from inadequate input validation in the description metadata field, allowing an attacker with administrator privileges to inject arbitrary JavaScript code. This stored XSS vulnerability can lead to significant security risks, as the malicious script executes on every page of the website, potentially compromising user data and session information. The impact is widespread, affecting all visitors to the site, except for those accessing the administrative panel.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.13.1 1.13.1
    composer require getformwork/formwork:1.13.1
  • >= 2.0.0-beta.1, < 2.0.0-beta.2 2.0.0-beta.2
    composer require getformwork/formwork:2.0.0-beta.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, administrators should avoid using the description field for any input that could contain HTML or JavaScript until the package is updated. Additionally, implementing Content Security Policy (CSP) headers can help mitigate the risk of XSS attacks.

Conclusion

The Stored XSS vulnerability in the Formwork package poses a significant risk to all users of the affected websites. It is crucial to update to the patched version to ensure the security of the site and its visitors. Administrators should take immediate action to mitigate risks and protect user data.

See every vulnerability recorded for getformwork/formwork →

Share this vulnerability

FAQ

The vulnerability is a Stored Cross-Site Scripting (XSS) issue that allows attackers to inject malicious JavaScript into the website's HTML.

All users visiting the affected website are at risk, except for those accessing the administrative panel.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

The CVSS score of this vulnerability is 4.8, indicating a moderate severity level.

If immediate updates are not possible, avoid using the vulnerable input fields and consider implementing Content Security Policy (CSP) headers as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for getformwork/formwork.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.13.1 1.13.1
    composer require getformwork/formwork:1.13.1
  • >= 2.0.0-beta.1, < 2.0.0-beta.2 2.0.0-beta.2
    composer require getformwork/formwork:2.0.0-beta.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback