CVE-2025-31697 Formatter Suite - Moderately critical - Cross site scripting - SA-CONTRIB-2025-026
An attacker can inject malicious scripts into web pages viewed by other users via the Formatter Suite module, potentially leading to session hijacking or data theft.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-31697?
CVE-2025-31697 is a medium-severity cross-site scripting vulnerability in Drupal Formatter Suite, published on 31 Mar 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in Drupal Formatter Suite allows Cross-Site Scripting (XSS).This issue affects Formatter Suite: from 0.0.0 before 2.1.0.
Weakness: CWE-79
Which versions are affected by CVE-2025-31697?
2 open source packages ship an affected version, including drupal/formatter_suite. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
drupal/formatter_suite Packagist | All versions | 2.1.0 |
drupal/formatter_suite Packagist | All versions | 2.1.0 |
Linux distribution packages (1)
drupal/formatter_suite Packagist:https://packages.drupal.org/8 | All versions | 2.1.0 |
Products include Formatter Suite Project Formatter Suite.
How do I fix CVE-2025-31697?
Upgrade drupal/formatter_suite to 2.1.0 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2025-31697 being exploited?
There is no known exploitation of CVE-2025-31697 in the wild and no public exploit code.
Sources
Also known as DRUPAL-CONTRIB-2025-026, GHSA-5r66-vgc7-2mm3.