CVE-2024-41366

9.8 CRITICAL

📋 TL;DR

CVE-2024-41366 is a critical remote code execution vulnerability in RPi-Jukebox-RFID version 2.7.0 that allows attackers to execute arbitrary code on affected systems via the htdocs/userScripts.php file. This affects all users running the vulnerable version of this open-source jukebox software for Raspberry Pi. Successful exploitation could lead to complete system compromise.

💻 Affected Systems

Products:
  • RPi-Jukebox-RFID
Versions: Version 2.7.0
Operating Systems: Linux (Raspberry Pi OS)
Default Config Vulnerable: ⚠️ Yes
Notes: Affects default installations of version 2.7.0. The software is typically deployed on Raspberry Pi devices.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system takeover with root privileges, installation of persistent backdoors, data theft, and use as pivot point for network attacks.

🟠

Likely Case

Unauthorized access to the Raspberry Pi system, manipulation of jukebox functionality, and potential data exfiltration.

🟢

If Mitigated

Limited impact if system is isolated from internet and internal networks with strict access controls.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable without authentication, making internet-facing instances extremely vulnerable.
🏢 Internal Only: HIGH - Even internally, the vulnerability can be exploited by any user with network access to the system.

🎯 Exploit Status

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

The vulnerability is in userScripts.php which appears to allow arbitrary code execution. Public GitHub issue demonstrates the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version 2.7.1 or later

Vendor Advisory: https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/2399

Restart Required: No

Instructions:

1. Backup your current installation. 2. Update to version 2.7.1 or later via git pull or fresh installation. 3. Verify the userScripts.php file has been properly secured.

🔧 Temporary Workarounds

Disable or remove userScripts.php

linux

Temporarily disable the vulnerable component by removing or restricting access to the userScripts.php file.

sudo rm /var/www/html/htdocs/userScripts.php
sudo chmod 000 /var/www/html/htdocs/userScripts.php

Restrict network access

linux

Configure firewall rules to limit access to the jukebox web interface.

sudo ufw deny 80/tcp
sudo ufw deny 443/tcp
sudo ufw allow from 192.168.1.0/24 to any port 80

🧯 If You Can't Patch

  • Isolate the Raspberry Pi from internet and restrict internal network access using firewall rules.
  • Implement strict access controls and monitor for any unauthorized access attempts to the web interface.

🔍 How to Verify

Check if Vulnerable:

Check if version 2.7.0 is installed and if userScripts.php exists in htdocs directory with insecure permissions.

Check Version:

cd /path/to/RPi-Jukebox-RFID && git describe --tags

Verify Fix Applied:

Verify installation of version 2.7.1 or later, and ensure userScripts.php has proper input validation and security controls.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to /htdocs/userScripts.php
  • Suspicious commands in web server logs
  • Unexpected system processes spawned from web user

Network Indicators:

  • Unusual outbound connections from Raspberry Pi
  • Traffic to unexpected ports from the jukebox system

SIEM Query:

source="apache_access" AND uri="/htdocs/userScripts.php" AND (method="POST" OR status>=400)

🔗 References

📤 Share & Export