CVE-2024-13304

4.5 MEDIUM

📋 TL;DR

A Cross-Site Request Forgery (CSRF) vulnerability in the Drupal Minify JS module allows attackers to trick authenticated users into performing unintended actions. This affects Drupal sites using the Minify JS module to optimize JavaScript delivery. Attackers could force users to execute malicious requests while logged into the Drupal administration interface.

💻 Affected Systems

Products:
  • Drupal Minify JS module
Versions: 0.0.0 through 3.0.2
Operating Systems: All operating systems running Drupal
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Drupal sites with the Minify JS module enabled. The module must be actively used for JavaScript optimization.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could trick an administrator into changing site configuration, adding malicious users, or modifying content through forged requests executed via the victim's authenticated session.

🟠

Likely Case

Attackers could force users to perform unintended actions like changing their own profile settings, submitting forms, or triggering module-specific operations while authenticated.

🟢

If Mitigated

With proper CSRF protections and user awareness, the impact is limited as the vulnerability requires user interaction and authentication.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: LOW

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires the attacker to trick an authenticated user into visiting a malicious page while logged into Drupal. No authentication bypass is involved.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.0.3

Vendor Advisory: https://www.drupal.org/sa-contrib-2024-070

Restart Required: No

Instructions:

1. Update the Minify JS module to version 3.0.3 or later via Drupal's update manager or Composer. 2. Clear Drupal caches after update. 3. Verify the module functions correctly with updated version.

🔧 Temporary Workarounds

Disable Minify JS module

all

Temporarily disable the vulnerable module until patching is possible

drush pm:disable minify_js

Implement CSRF token validation

all

Add custom CSRF protection to forms if module modification is possible

🧯 If You Can't Patch

  • Restrict administrative access to trusted networks only
  • Implement web application firewall rules to detect CSRF patterns

🔍 How to Verify

Check if Vulnerable:

Check the installed version of the Minify JS module in Drupal's Extend page or via drush: drush pm:list | grep minify_js

Check Version:

drush pm:list --fields=name,version | grep minify_js

Verify Fix Applied:

Confirm the module version is 3.0.3 or higher and test JavaScript minification functionality

📡 Detection & Monitoring

Log Indicators:

  • Unexpected form submissions from unverified sources
  • Administrative actions from unusual IP addresses

Network Indicators:

  • HTTP POST requests without proper referrer headers or CSRF tokens to minify JS endpoints

SIEM Query:

web_requests WHERE uri CONTAINS '/minify-js' AND method = 'POST' AND (referrer IS NULL OR referrer NOT CONTAINS trusted_domain)

🔗 References

📤 Share & Export