CVE-2025-54597

7.2 HIGH

📋 TL;DR

This vulnerability allows attackers to inject malicious scripts via the 'q' parameter in LinuxServer.io Heimdall, potentially compromising user sessions. It affects all Heimdall instances running versions before 2.7.3. Users who access a maliciously crafted URL could have their browser execute arbitrary JavaScript in the context of the Heimdall application.

💻 Affected Systems

Products:
  • LinuxServer.io Heimdall
Versions: All versions before 2.7.3
Operating Systems: Linux, Windows, macOS, Docker
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all deployment methods (Docker, bare metal, etc.) where Heimdall is exposed to user input.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal session cookies, perform actions as authenticated users, redirect to malicious sites, or install malware on client systems.

🟠

Likely Case

Session hijacking leading to unauthorized access to the Heimdall dashboard and potentially other integrated services.

🟢

If Mitigated

Limited impact with proper Content Security Policy headers and input validation, though basic XSS protection would still be bypassed.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

XSS vulnerabilities are commonly weaponized. The 'q' parameter appears to be a search parameter that accepts user input without proper sanitization.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.7.3

Vendor Advisory: https://github.com/linuxserver/Heimdall/commit/d1a96dd752ba30dc56380400dd2587d8abb8e9d1

Restart Required: Yes

Instructions:

1. Update Heimdall to version 2.7.3 or later. 2. For Docker deployments: pull the latest image and restart container. 3. For manual installations: replace files with patched version from GitHub.

🔧 Temporary Workarounds

Input Validation via WAF

all

Implement web application firewall rules to sanitize or block malicious 'q' parameter values.

# Example nginx rule to block script tags in q parameter
location / {
    if ($arg_q ~* "<script") {
        return 403;
    }
}

Content Security Policy

all

Implement strict CSP headers to mitigate impact of successful XSS exploitation.

# Add to web server config
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval';" always;

🧯 If You Can't Patch

  • Implement strict Content Security Policy headers to limit script execution
  • Deploy a web application firewall with XSS protection rules

🔍 How to Verify

Check if Vulnerable:

Check Heimdall version in web interface or via Docker inspect. Test by attempting XSS payload in 'q' parameter.

Check Version:

docker inspect heimdall | grep -i version || grep version /path/to/heimdall/config

Verify Fix Applied:

Confirm version is 2.7.3 or later. Test that script tags in 'q' parameter are properly sanitized.

📡 Detection & Monitoring

Log Indicators:

  • Unusual 'q' parameter values containing script tags or JavaScript code
  • Multiple failed login attempts from new user agents

Network Indicators:

  • HTTP requests with 'q' parameter containing suspicious patterns like <script>, javascript:, or encoded payloads

SIEM Query:

web.url:*q=*<script* OR web.url:*q=*javascript:*

🔗 References

📤 Share & Export