CVE-2024-41148

7.8 HIGH

📋 TL;DR

This CVE allows local users to execute arbitrary Python code through the ROS rostopic command's 'hz' verb filter option. The vulnerability affects ROS Noetic Ninjemys and earlier distributions where the eval() function processes unsanitized user input. Attackers with local access can exploit this to gain unauthorized code execution.

💻 Affected Systems

Products:
  • Robot Operating System (ROS)
Versions: Noetic Ninjemys and earlier distributions
Operating Systems: Linux (primary ROS platform)
Default Config Vulnerable: ⚠️ Yes
Notes: Affects systems where ROS is installed and local users have access to the rostopic command

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with privilege escalation, data theft, and persistent backdoor installation

🟠

Likely Case

Local privilege escalation leading to unauthorized access to sensitive ROS data and system resources

🟢

If Mitigated

Limited impact if proper access controls restrict local user privileges and command execution

🌐 Internet-Facing: LOW - Requires local access to the system, not directly exploitable over network
🏢 Internal Only: HIGH - Local users can exploit this to gain elevated privileges and compromise ROS environments

🎯 Exploit Status

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

Exploitation requires local access but is straightforward once access is obtained

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: ROS Noetic end-of-life - upgrade to ROS 2 recommended

Vendor Advisory: https://www.ros.org/blog/noetic-eol/

Restart Required: No

Instructions:

1. Upgrade to ROS 2 (recommended)
2. Apply any available security patches for ROS Noetic
3. Remove or restrict access to vulnerable rostopic command

🔧 Temporary Workarounds

Restrict rostopic command access

linux

Remove execute permissions or restrict access to rostopic command for non-privileged users

sudo chmod 750 /opt/ros/noetic/bin/rostopic
sudo chown root:ros-users /opt/ros/noetic/bin/rostopic

Disable filter option

linux

Create wrapper script that strips --filter option from rostopic calls

Create script that intercepts rostopic calls and removes --filter parameter

🧯 If You Can't Patch

  • Implement strict access controls to limit local user privileges
  • Monitor for suspicious rostopic command usage with --filter option

🔍 How to Verify

Check if Vulnerable:

Check if rostopic command exists and test with --filter option using safe expression

Check Version:

rosversion -d

Verify Fix Applied:

Verify rostopic command permissions are restricted or test that --filter option is blocked

📡 Detection & Monitoring

Log Indicators:

  • Unusual rostopic command executions with --filter option
  • Python eval() errors in system logs
  • Suspicious process spawns from rostopic

Network Indicators:

  • Not applicable - local exploitation only

SIEM Query:

Process execution where command contains 'rostopic' AND command contains '--filter'

🔗 References

📤 Share & Export