CVE-2025-31697

6.1 MEDIUM

📋 TL;DR

This vulnerability allows attackers to inject malicious scripts into web pages generated by Drupal Formatter Suite, potentially stealing user credentials or session cookies. It affects all Drupal sites using Formatter Suite versions before 2.1.0. The vulnerability requires user interaction to trigger the malicious script execution.

💻 Affected Systems

Products:
  • Drupal Formatter Suite
Versions: 0.0.0 through 2.0.x
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All Drupal installations using vulnerable Formatter Suite versions are affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator credentials, hijack user sessions, deface websites, or redirect users to malicious sites, potentially leading to complete site compromise.

🟠

Likely Case

Attackers would typically steal user session cookies or credentials through phishing-style attacks, potentially gaining unauthorized access to user accounts.

🟢

If Mitigated

With proper input validation and output encoding, the risk is limited to users who intentionally bypass security controls or use outdated browsers.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

XSS vulnerabilities typically have low exploitation complexity, though specific exploitation details for this CVE are not publicly documented.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.1.0

Vendor Advisory: https://www.drupal.org/sa-contrib-2025-026

Restart Required: No

Instructions:

1. Update Drupal Formatter Suite to version 2.1.0 or later via Drupal's update manager. 2. Clear all caches. 3. Verify the update was successful by checking the module version.

🔧 Temporary Workarounds

Disable Formatter Suite

linux

Temporarily disable the vulnerable module until patching is possible

drush pm-disable formatter_suite

Enable Content Security Policy

all

Implement CSP headers to restrict script execution sources

🧯 If You Can't Patch

  • Implement web application firewall rules to block XSS payloads
  • Enable Drupal's built-in XSS protection features and ensure all user input is properly sanitized

🔍 How to Verify

Check if Vulnerable:

Check Drupal's Extend page or use 'drush pm-list' to see if Formatter Suite version is below 2.1.0

Check Version:

drush pm-list | grep formatter_suite

Verify Fix Applied:

Confirm Formatter Suite version is 2.1.0 or higher via Drupal UI or 'drush pm-list' command

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests with script tags or JavaScript payloads
  • Multiple failed XSS attempts in web server logs

Network Indicators:

  • HTTP requests containing suspicious script tags or encoded JavaScript

SIEM Query:

source="web_server_logs" AND ("<script" OR "javascript:" OR "onerror=" OR "onload=")

🔗 References

📤 Share & Export