{"api_version":"1","generated_at":"2026-10-10T15:44:13+00:00","cve":"CVE-2024-42002","urls":{"html":"https://cve.report/CVE-2024-42002","api":"https://cve.report/api/cve/CVE-2024-42002.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2024-42002","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-42002"},"summary":{"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 passed directly to the eval() function without sanitization, allowing a local user to craft and execute arbitrary code.","state":"PUBLISHED","assigner":"canonical","published_at":"2026-09-28 22:17:28","updated_at":"2026-09-30 14:17:17"},"problem_types":["CWE-94","CWE-95","CWE-95 CWE-95 Improper neutralization of directives in dynamically evaluated code ('eval injection')","CWE-94 CWE-94 Improper Control of Generation of Code ('Code Injection')"],"metrics":[{"version":"4.0","source":"security@ubuntu.com","type":"Secondary","score":"8.6","severity":"HIGH","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","data":{"version":"4.0","vectorString":"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","baseScore":8.6,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}},{"version":"4.0","source":"CNA","type":"CVSS","score":"8.6","severity":"HIGH","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","data":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"LOCAL","baseScore":8.6,"baseSeverity":"HIGH","exploitMaturity":"NOT_DEFINED","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"}},{"version":"3.1","source":"security@ubuntu.com","type":"Secondary","score":"8.4","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.4,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"CVSS","score":"8.4","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","data":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"HIGH","baseScore":8.4,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://github.com/ros2/ros2cli/pull/133#discussion_r223081766","name":"https://github.com/ros2/ros2cli/pull/133#discussion_r223081766","refsource":"security@ubuntu.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/ros2/ros2cli/pull/1001","name":"https://github.com/ros2/ros2cli/pull/1001","refsource":"security@ubuntu.com","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-42002","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42002","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","version":"affected Rolling Ridley custom","platforms":["Linux","MacOS","Windows"]},{"source":"CNA","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","version":"affected Lyrical Luth custom","platforms":["Linux","MacOS","Windows"]},{"source":"CNA","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","version":"affected Kilted Kaiju custom","platforms":["Linux","MacOS","Windows"]},{"source":"CNA","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","version":"affected Jazzy Jalisco custom","platforms":["Linux","MacOS","Windows"]},{"source":"CNA","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","version":"affected Iron Irwini custom","platforms":["Linux","MacOS","Windows"]},{"source":"CNA","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","version":"affected Humble Hawksbill custom","platforms":["Linux","MacOS","Windows"]},{"source":"CNA","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","version":"affected Galactic Geochelone custom","platforms":["Linux","MacOS","Windows"]},{"source":"CNA","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","version":"affected Foxy Fitzroy custom","platforms":["Linux","MacOS","Windows"]},{"source":"CNA","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","version":"affected Eloquent Elusor custom","platforms":["Linux","MacOS","Windows"]},{"source":"CNA","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","version":"affected Dashing Diademata custom","platforms":["Linux","MacOS","Windows"]},{"source":"CNA","vendor":"Open Source Robotics Foundation","product":"Robot Operating System 2 (ROS 2)","version":"affected Crystal Clemmys custom","platforms":["Linux","MacOS","Windows"]}],"timeline":[],"solutions":[{"source":"CNA","title":"","value":"No fixed release is available at the time of publication. A fix is proposed upstream in https://github.com/ros2/ros2cli/pull/1001.","time":"","lang":"en"}],"workarounds":[{"source":"CNA","title":"","value":"Do not pass untrusted or unreviewed input to the --filter option of 'ros2 topic hz'.","time":"","lang":"en"}],"exploits":[],"credits":[{"source":"CNA","value":"Florencia Cabral Berenfus, Ubuntu Robotics Team","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2024","cve_id":"42002","cve":"CVE-2024-42002","epss":"0.001600000","percentile":"0.044250000","score_date":"2026-09-29","updated_at":"2026-09-30 00:11:20"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"metrics":[{"other":{"content":{"id":"CVE-2024-42002","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","timestamp":"2026-09-30T13:43:08.696167Z","version":"2.0.3"},"type":"ssvc"}}],"providerMetadata":{"dateUpdated":"2026-09-30T13:43:15.912Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"title":"CISA ADP Vulnrichment"}],"cna":{"affected":[{"defaultStatus":"unaffected","modules":["ros2topic"],"packageName":"ros2topic","platforms":["Linux","MacOS","Windows"],"product":"Robot Operating System 2 (ROS 2)","programFiles":["ros2topic/ros2topic/verb/hz.py"],"repo":"https://github.com/ros2/ros2cli","vendor":"Open Source Robotics Foundation","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"}]}],"credits":[{"lang":"en","type":"finder","value":"Florencia Cabral Berenfus, Ubuntu Robotics Team"}],"descriptions":[{"lang":"en","value":"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."}],"impacts":[{"capecId":"CAPEC-242","descriptions":[{"lang":"en","value":"CAPEC-242 Code Injection"}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"LOCAL","baseScore":8.6,"baseSeverity":"HIGH","exploitMaturity":"NOT_DEFINED","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]},{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"HIGH","baseScore":8.4,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-95","description":"CWE-95 Improper neutralization of directives in dynamically evaluated code ('eval injection')","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-94","description":"CWE-94 Improper Control of Generation of Code ('Code Injection')","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-09-28T21:38:08.369Z","orgId":"cc1ad9ee-3454-478d-9317-d3e869d708bc","shortName":"canonical"},"references":[{"tags":["patch"],"url":"https://github.com/ros2/ros2cli/pull/1001"},{"tags":["issue-tracking"],"url":"https://github.com/ros2/ros2cli/pull/133#discussion_r223081766"}],"solutions":[{"lang":"en","value":"No fixed release is available at the time of publication. A fix is proposed upstream in https://github.com/ros2/ros2cli/pull/1001."}],"source":{"discovery":"INTERNAL"},"title":"Unsafe use of eval() method in ros2 topic hz tool","workarounds":[{"lang":"en","value":"Do not pass untrusted or unreviewed input to the --filter option of 'ros2 topic hz'."}],"x_generator":{"engine":"cvelib 1.8.0"}}},"cveMetadata":{"assignerOrgId":"cc1ad9ee-3454-478d-9317-d3e869d708bc","assignerShortName":"canonical","cveId":"CVE-2024-42002","datePublished":"2026-09-28T21:38:08.369Z","dateReserved":"2024-08-01T12:00:12.183Z","dateUpdated":"2026-09-30T13:43:15.912Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-09-28 22:17:28","lastModifiedDate":"2026-09-30 14:17:17","problem_types":["CWE-94","CWE-95","CWE-95 CWE-95 Improper neutralization of directives in dynamically evaluated code ('eval injection')","CWE-94 CWE-94 Improper Control of Generation of Code ('Code Injection')"],"metrics":{"cvssMetricV40":[{"source":"security@ubuntu.com","type":"Secondary","cvssData":{"version":"4.0","vectorString":"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","baseScore":8.6,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}}],"cvssMetricV31":[{"source":"security@ubuntu.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.4,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":2.5,"impactScore":5.9}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-09-30T13:43:08.696167Z","id":"CVE-2024-42002","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalImpact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2024","CveId":"42002","Ordinal":"1","Title":"Unsafe use of eval() method in ros2 topic hz tool","CVE":"CVE-2024-42002","Year":"2024"},"notes":[{"CveYear":"2024","CveId":"42002","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"Unsafe use of eval() method in ros2 topic hz tool"}]}}}