RCE in Open Source Robotics Foundation Robot Operating System 2 (Ros 2)
CVE-2024-42002
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.
Vulnerability class: RCE (Remote Code Execution)
Published .
CVSS v3 metric
CVSS v3 base score 8.4 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
No EPSS score from FIRST.org yet. New CVEs usually get one within a few days; no score means no signal yet, not low risk. How EPSS works.
Affected products
- Open Source Robotics Foundation Robot Operating System 2 (Ros 2) — versions Crystal Clemmys, Dashing Diademata, Eloquent Elusor
Weakness classification (CWE)
References
- github.com/ros2/ros2cli/pull/1001 (patch)
- github.com/ros2/ros2cli/pull/133 (issue-tracking)
Frequently asked questions
- What is CVE-2024-42002?
- CVE-2024-42002 is a high-severity vulnerability in Open Source Robotics Foundation Robot Operating System 2 (Ros 2), classified under Code Injection. CVSS score: 8.4/10. Published 2026-09-28.
- How severe is CVE-2024-42002?
- High severity. CVSS v3 base score is 8.4 out of 10.