CVE-2024-41921 Unsafe use of eval() method in rostopic echo tool
A local attacker can execute arbitrary code via the rostopic echo 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-41921?
CVE-2024-41921 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 'echo' verb, which allows a user to introspect a ROS 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.
Which versions are affected by CVE-2024-41921?
It affects 1 product.
Products include Openrobotics Robot Operating System.
How do I fix CVE-2024-41921?
No fix has been published for CVE-2024-41921 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-41921 being exploited?
There is no known exploitation of CVE-2024-41921 in the wild and no public exploit code.
Other vulnerabilities in Open Source Robotics Foundation Robot Operating System (ROS)
Sources
Also known as DEBIAN-CVE-2024-41921, GHSA-7mg9-54m6-qh35, UBUNTU-CVE-2024-41921.