Cross-site scripting vulnerability in Markdown fields in Formwork

getformwork/formwork Updated 02 Oct 2025

Summary

28/05/2024
Yes i
Moderate
4.8

CVE-2024-35621: formwork Cross-site scripting vulnerability in Markdown fields. Affects getformwork/formwork versions < 1.13.0. Fixed in 1.13.0. 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Formwork is a package available on Packagist that provides an administration panel for managing website content. It allows users with page editing permissions to create and edit pages using Markdown fields. Markdown is a lightweight markup language that converts plain text into HTML. However, a vulnerability has been discovered in Formwork that allows users to insert malicious script tags in Markdown fields, which are then displayed on publicly accessible site pages. This vulnerability can lead to potential cross-site scripting (XSS) injections.

Vulnerability Detail

The vulnerability in Formwork arises from the lack of proper sanitization of user input in Markdown fields. This allows users with access to the administration panel and page editing permissions to insert <script> tags, which can execute arbitrary JavaScript code on the site pages. This can lead to various security risks, such as stealing user session cookies, defacing the website, or redirecting users to malicious websites. The vulnerability has a CVSS score of 4.8, indicating a moderate severity level.

How To Fix

Minimum fixed version

1.13.0

This is the first release that contains the fix.

composer require getformwork/formwork:1.13.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

The Cross-site scripting vulnerability in Markdown fields in Formwork allows users with access to the administration panel and page editing permissions to insert malicious script tags, leading to potential XSS injections. To fix this vulnerability, it is recommended to update the Formwork package to version 1.13.0 or later and configure the content.safe_mode option appropriately. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for getformwork/formwork →

Share this vulnerability

FAQ

The vulnerability allows users with access to the administration panel and page editing permissions to insert malicious script tags in Markdown fields. These tags are then displayed on publicly accessible site pages, potentially leading to cross-site scripting (XSS) injections. This can result in various security risks, such as stealing user session cookies, defacing the website, or redirecting users to malicious websites.

To fix this vulnerability, you should update the Formwork package to version 1.13.0 or later. This version includes a patch that introduces a new system configuration option called content.safe_mode. By default, this option escapes HTML tags and dangerous links in Markdown fields to prevent XSS injections. Ensure that only a controlled group of editors have access to the administration panel and cannot enable the content.safe_mode option themselves to mitigate the risk of introducing vulnerabilities.

There is no specific workaround for this vulnerability. The recommended solution is to update the Formwork package to version 1.13.0 or later and configure the content.safe_mode option appropriately.

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

Related vulnerabilities

Recent vulnerabilities recorded for getformwork/formwork.

How To Fix

Minimum fixed version

1.13.0

This is the first release that contains the fix.

composer require getformwork/formwork:1.13.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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