{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-42002","id":"CVE-2024-42002","title":"Unsafe use of eval() method in ros2 topic hz tool","description":"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","descriptionLong":"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.","published":"2026-09-28T21:38:08.369Z","updated":"2026-11-09T10:10:00.217Z","reserved":"2024-08-01T12:00:12.183Z","status":"Awaiting Analysis","rejected":false,"assigner":"canonical","metric":{"version":"4.0","score":8.6,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"high","source":"canonical"},"metrics":[{"version":"4.0","score":8.6,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"high","source":"canonical"},{"version":"4.0","score":8.6,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","rating":"high","source":"ubuntu.com"},{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"canonical"},{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"ubuntu.com"}],"rating":"high","products":["Open Source Robotics Foundation Robot Operating System 2 (ROS 2)"],"affectedProducts":[{"vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","defaultStatus":"unaffected","versions":[{"status":"affected","version":"Rolling Ridley","versionType":"custom"},{"status":"affected","version":"Lyrical Luth","versionType":"custom"},{"status":"affected","version":"Kilted Kaiju","versionType":"custom"},{"status":"affected","version":"Jazzy Jalisco","versionType":"custom"},{"status":"affected","version":"Iron Irwini","versionType":"custom"},{"status":"affected","version":"Humble Hawksbill","versionType":"custom"},{"status":"affected","version":"Galactic Geochelone","versionType":"custom"},{"status":"affected","version":"Foxy Fitzroy","versionType":"custom"},{"status":"affected","version":"Eloquent Elusor","versionType":"custom"},{"status":"affected","version":"Dashing Diademata","versionType":"custom"},{"status":"affected","version":"Crystal Clemmys","versionType":"custom"}],"platforms":["Linux","MacOS","Windows"]}],"packages":[],"cwes":["CWE-95","CWE-94"],"aliases":[],"references":[{"url":"https://github.com/ros2/ros2cli/pull/1001","tags":["patch"]},{"url":"https://github.com/ros2/ros2cli/pull/133#discussion_r223081766","tags":["issue-tracking"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.0016,"epssPercentile":0.05194,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-42002","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42002","ok":true,"note":"Awaiting Analysis"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-42002","ok":false,"note":"no open-source package data"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-42002","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}