CVE-2024-41148 Unsafe use of eval() method in rostopic hz tool

High 7.8 Published Updated

Local attackers can execute arbitrary code via the rostopic hz tool's filter option due to unsafe eval usage.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2024-41148?

CVE-2024-41148 is a high-severity code injection vulnerability in Open Source Robotics Foundation Robot Operating System (ROS), published on 17 Jul 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

A code injection vulnerability has been discovered in the Robot Operating System (ROS) 'rostopic' command-line tool, affecting ROS distributions Noetic Ninjemys and earlier. The vulnerability lies in the 'hz' verb, which reports the publishing rate of a topic and accepts a user-provided Python expression via the --filter option. This input is passed directly to the eval() function without sanitization, allowing a local user to craft and execute arbitrary code.

Weakness: CWE-95, CWE-94

Which versions are affected by CVE-2024-41148?

It affects 1 product.

Products include Openrobotics Robot Operating System.

How do I fix CVE-2024-41148?

No fix has been published for CVE-2024-41148 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2024-41148 being exploited?

There is no known exploitation of CVE-2024-41148 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2024-41148, GHSA-f577-ch35-2wcx, UBUNTU-CVE-2024-41148.

Is CVE-2024-41148 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free