CVE-2025-48447

7.1 HIGH

📋 TL;DR

This Cross-Site Scripting (XSS) vulnerability in Drupal's Lightgallery module allows attackers to inject malicious scripts into web pages. When exploited, these scripts execute in victims' browsers, potentially stealing session cookies, redirecting users, or performing actions on their behalf. All Drupal sites using vulnerable versions of the Lightgallery module are affected.

💻 Affected Systems

Products:
  • Drupal Lightgallery module
Versions: 0.0.0 through 1.5.x
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Drupal sites with the Lightgallery module enabled. The vulnerability exists in how the module processes and displays user-supplied content.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers steal administrator session cookies, gain full administrative access to the Drupal site, install backdoors, deface the site, or exfiltrate sensitive user data.

🟠

Likely Case

Attackers steal user session cookies to hijack accounts, redirect users to phishing sites, or perform actions on behalf of authenticated users.

🟢

If Mitigated

With proper input validation and output encoding controls, malicious scripts are neutralized before reaching users' browsers, preventing exploitation.

🌐 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. Attackers need to trick users into visiting a malicious page or submitting crafted input.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.6.0

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

Restart Required: No

Instructions:

1. Update the Lightgallery module to version 1.6.0 or later via Drupal's update manager. 2. Clear Drupal caches. 3. Verify the update was successful.

🔧 Temporary Workarounds

Disable Lightgallery module

all

Temporarily disable the vulnerable module until patching is possible

drush pm-disable lightgallery

Implement Content Security Policy

all

Add CSP headers to restrict script execution sources

Add 'Content-Security-Policy' header to web server configuration

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block XSS payloads
  • Enable Drupal's built-in XSS protection features and ensure input validation is enforced

🔍 How to Verify

Check if Vulnerable:

Check Drupal's module status page or use 'drush pm-list' to see if Lightgallery module is installed and check its version

Check Version:

drush pm-list --fields=name,version | grep lightgallery

Verify Fix Applied:

Confirm Lightgallery module version is 1.6.0 or higher via Drupal admin interface or 'drush pm-list'

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests containing script tags or JavaScript code to Lightgallery endpoints
  • Multiple failed authentication attempts following suspicious page visits

Network Indicators:

  • HTTP requests containing <script> tags or JavaScript event handlers in parameters
  • Outbound connections to suspicious domains after visiting affected pages

SIEM Query:

source="drupal_access.log" AND ("lightgallery" AND ("<script>" OR "javascript:" OR "onerror=" OR "onload="))

🔗 References

📤 Share & Export