CVE-2024-42002Unsafe use of eval() method in ros2 topic hz tool
Updated under an hour ago ()
Does this affect you?
It affects Open Source Robotics Foundation Robot Operating System 2 (ROS 2). Add what you run to find out whether that includes you.
EPSS puts the chance of exploitation in the next 30 days at 0.16%, higher than 5% of scored CVEs.
Do this next
Free account, 1 product
A code injection vulnerability has been discovered in the Robot Operating System 2 (ROS 2) 'ros2topic' command-line tool, affecting all ROS 2 distributions from Crystal Clemmys up to and including Lyrical Luth and Rolling Ridley. 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.
- CVSS
- 8.4 HIGH (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weakness (CWE)
- CWE-95, CWE-94
- Known exploited
- Not in CISA's KEV catalog
- EPSS (exploitation in the next 30 days)
- 0.16% (percentile 5)
- Assigned by
- canonical
- NVD analysis
- Awaiting Analysis
- Record last updated
- Sep 30, 2026
- First seen by InfoSec Signals
- Oct 9, 2026
Affected products
Open Source Robotics Foundation Robot Operating System 2 (ROS 2) open_source_robotics_foundation:robot_operating_system_2_ros_2 (from the name) | Rolling Ridley; Lyrical Luth; Kilted Kaiju; Jazzy Jalisco; Iron Irwini; Humble Hawksbill; Galactic Geochelone; Foxy Fitzroy; and 3 more ranges | CNA record |
References
- https://github.com/ros2/ros2cli/pull/1001patch
- https://github.com/ros2/ros2cli/pull/133#discussion_r223081766issue-tracking
The CVE record on cve.org NVD's entry
The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.