CVE-2023-51803

9.8 CRITICAL

📋 TL;DR

This vulnerability in Heimdall allows attackers to upload malicious icons containing PHP code, potentially leading to remote code execution. It affects all Heimdall instances before version 2.5.7 that allow icon uploads. The high CVSS score reflects the potential for complete system compromise.

💻 Affected Systems

Products:
  • LinuxServer.io Heimdall
Versions: All versions before 2.5.7
Operating Systems: Linux, Windows, macOS, Docker
Default Config Vulnerable: ⚠️ Yes
Notes: Affects any installation with icon upload functionality enabled (default). Docker deployments are also vulnerable.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system takeover, data exfiltration, lateral movement, and persistent backdoor installation.

🟠

Likely Case

Webshell deployment allowing file system access, credential theft, and further exploitation of the hosting environment.

🟢

If Mitigated

Limited impact with proper file upload restrictions and web application firewalls blocking malicious payloads.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated access to upload icons. The vulnerability is straightforward to exploit once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.5.7

Vendor Advisory: https://github.com/linuxserver/Heimdall/releases/tag/v2.5.7

Restart Required: Yes

Instructions:

1. Backup your Heimdall configuration and database. 2. Update to version 2.5.7 via your package manager or Docker. 3. Restart the Heimdall service. 4. Verify the update completed successfully.

🔧 Temporary Workarounds

Disable Icon Uploads

all

Temporarily disable the ability to upload custom icons in Heimdall configuration

Edit Heimdall configuration to remove icon upload functionality

Web Application Firewall Rules

all

Implement WAF rules to block file uploads containing PHP code patterns

Add WAF rule: block requests with file uploads containing '<?php' or similar patterns

🧯 If You Can't Patch

  • Restrict access to Heimdall to trusted users only using network segmentation
  • Implement strict file upload validation at the web server level (e.g., nginx/apache rules)

🔍 How to Verify

Check if Vulnerable:

Check Heimdall version in web interface or via command: docker exec heimdall cat /app/www/version.txt

Check Version:

docker exec heimdall cat /app/www/version.txt || check web interface settings

Verify Fix Applied:

Confirm version is 2.5.7 or higher and test that PHP files cannot be uploaded as icons

📡 Detection & Monitoring

Log Indicators:

  • File upload attempts with .php extensions
  • Web server logs showing execution of uploaded files
  • Unusual file creation in upload directories

Network Indicators:

  • HTTP POST requests to icon upload endpoints with suspicious content
  • Outbound connections from Heimdall server to unknown IPs

SIEM Query:

source="heimdall" AND (url_path="/upload" OR file_extension=".php")

🔗 References

📤 Share & Export