{"id":"CVE-2024-42002","title":"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","summary":"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 vul…","severity":"high","cvss":8.4,"cvssVector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cwe":["CWE-94","CWE-95"],"vendor":"Open Source Robotics Foundation","product":"ros2topic","affected":["ros2topic Rolling Ridley","ros2topic Lyrical Luth","ros2topic Kilted Kaiju","ros2topic Jazzy Jalisco","ros2topic Iron Irwini","ros2topic Humble Hawksbill","ros2topic Galactic Geochelone","ros2topic Foxy Fitzroy","ros2topic Eloquent Elusor","ros2topic Dashing Diademata","ros2topic Crystal Clemmys"],"published":"2026-09-28","updated":"2026-09-28","sourceUpdated":"2026-09-28T22:17:28.617","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2024-42002","references":[{"url":"https://github.com/ros2/ros2cli/pull/1001","label":"security@ubuntu.com"},{"url":"https://github.com/ros2/ros2cli/pull/133#discussion_r223081766","label":"security@ubuntu.com"}],"tags":["nvd","cve.org"],"ingestedAt":"2026-09-28T22:22:13.606Z","slug":"CVE-2024-42002","body":"## Overview\n\nA 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.\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"twilight","depthScore":46,"depthScoreParts":{"impact":46.2,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}