{"id":"CVE-2024-42002","published":"2026-09-28T21:38:08Z","modified":"2026-09-30T13:43:15Z","title":"Unsafe use of eval() method in ros2 topic hz tool","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0016,"percentile":0.05249,"provenance":"source"},"cwes":[{"id":"CWE-95","name":"Improper Neutralization of Directives in Dynamically Evaluated Code"},{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/ros2/ros2cli/pull/1001","tags":["patch"]},{"url":"https://github.com/ros2/ros2cli/pull/133#discussion_r223081766","tags":["issue-tracking"]}],"priority":{"score":6.9,"factors":[{"name":"EPSS percentile","points":1.05},{"name":"CVSS severity","points":5.88}]},"vendorSlug":"open-source-robotics-foundation","affectedVersions":[{"vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","versions":["Rolling Ridley","Lyrical Luth","Kilted Kaiju","Jazzy Jalisco","Iron Irwini","Humble Hawksbill","Galactic Geochelone","Foxy Fitzroy","Eloquent Elusor","Dashing Diademata"]}],"solutions":{"items":["No fixed release is available at the time of publication. A fix is proposed upstream in https://github.com/ros2/ros2cli/pull/1001."],"from":"CVE.org CNA","provenance":"source"},"workarounds":{"items":["Do not pass untrusted or unreviewed input to the --filter option of 'ros2 topic hz'."],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-242","name":"Code Injection"}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-09-30T13:43:08.696167Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-55773","exploited":false,"provenance":"source"}}