CVE-2025-13984

6.1 MEDIUM

📋 TL;DR

This CVE describes a Cross-Site Scripting (XSS) vulnerability in Drupal Next.Js modules due to an overly permissive cross-domain security policy. Attackers can inject malicious scripts that execute in users' browsers when they visit affected pages. This affects Drupal sites using vulnerable versions of the Next.Js module.

💻 Affected Systems

Products:
  • Drupal Next.Js module
Versions: from 0.0.0 before 1.6.4, from 2.0.0 before 2.0.1
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Drupal sites with the Next.Js module installed and enabled. The vulnerability is in the module's cross-domain policy configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal session cookies, perform actions as authenticated users, deface websites, or redirect users to malicious sites, potentially leading to complete account compromise.

🟠

Likely Case

Attackers inject malicious scripts to steal user session tokens or credentials, leading to unauthorized access to user accounts and potential data theft.

🟢

If Mitigated

With proper Content Security Policy (CSP) headers and input validation, the attack surface is reduced, though the vulnerability still exists in the code.

🌐 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. The advisory suggests the vulnerability allows script injection via untrusted domains.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.6.4 or 2.0.1

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

Restart Required: No

Instructions:

1. Update the Next.Js module to version 1.6.4 (for 1.x branch) or 2.0.1 (for 2.x branch). 2. Clear Drupal caches. 3. Verify the update applied correctly.

🔧 Temporary Workarounds

Implement Strict Content Security Policy

all

Add a restrictive CSP header to limit script execution to trusted sources only.

Add to .htaccess or web server config: Header set Content-Security-Policy "default-src 'self'; script-src 'self'"
For Nginx: add_header Content-Security-Policy "default-src 'self'; script-src 'self';";

Disable Next.Js Module

all

Temporarily disable the vulnerable module if immediate patching isn't possible.

drush pm-disable nextjs
Or disable via Drupal admin interface at /admin/modules

🧯 If You Can't Patch

  • Implement strict Content Security Policy headers to restrict script execution.
  • Disable the Next.Js module entirely until patching is possible.

🔍 How to Verify

Check if Vulnerable:

Check the installed Next.Js module version via Drupal admin at /admin/modules or using drush: drush pm-list | grep nextjs

Check Version:

drush pm-list | grep nextjs

Verify Fix Applied:

Confirm the module version is 1.6.4 or higher (for 1.x) or 2.0.1 or higher (for 2.x) using the same methods.

📡 Detection & Monitoring

Log Indicators:

  • Unusual script tags or JavaScript in user inputs or URL parameters in web server logs.
  • Errors related to cross-domain policy violations in browser console logs.

Network Indicators:

  • HTTP requests with suspicious script payloads in parameters.
  • Unexpected cross-domain requests from the Drupal site.

SIEM Query:

web_access_logs AND (url_contains("<script") OR url_contains("javascript:"))

🔗 References

📤 Share & Export