{"dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": {"cveId": "CVE-2024-42002", "assignerOrgId": "cc1ad9ee-3454-478d-9317-d3e869d708bc", "state": "PUBLISHED", "assignerShortName": "canonical", "dateReserved": "2024-08-01T12:00:12.183Z", "datePublished": "2026-09-28T21:38:08.369Z", "dateUpdated": "2026-09-30T13:43:15.912Z"}, "containers": {"cna": {"title": "Unsafe use of eval() method in ros2 topic hz tool", "problemTypes": [{"descriptions": [{"lang": "en", "cweId": "CWE-95", "description": "CWE-95 Improper neutralization of directives in dynamically evaluated code ('eval injection')", "type": "CWE"}]}, {"descriptions": [{"lang": "en", "cweId": "CWE-94", "description": "CWE-94 Improper Control of Generation of Code ('Code Injection')", "type": "CWE"}]}], "impacts": [{"capecId": "CAPEC-242", "descriptions": [{"lang": "en", "value": "CAPEC-242 Code Injection"}]}], "affected": [{"vendor": "Open Source Robotics Foundation", "product": "Robot Operating System 2 (ROS 2)", "platforms": ["Linux", "MacOS", "Windows"], "packageName": "ros2topic", "repo": "https://github.com/ros2/ros2cli", "modules": ["ros2topic"], "programFiles": ["ros2topic/ros2topic/verb/hz.py"], "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"}], "defaultStatus": "unaffected"}], "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."}], "references": [{"url": "https://github.com/ros2/ros2cli/pull/1001", "tags": ["patch"]}, {"url": "https://github.com/ros2/ros2cli/pull/133#discussion_r223081766", "tags": ["issue-tracking"]}], "metrics": [{"format": "CVSS", "scenarios": [{"lang": "en", "value": "GENERAL"}], "cvssV4_0": {"attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "subConfidentialityImpact": "NONE", "vulnIntegrityImpact": "HIGH", "subIntegrityImpact": "NONE", "vulnAvailabilityImpact": "HIGH", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED", "version": "4.0", "baseSeverity": "HIGH", "baseScore": 8.6, "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"}}, {"format": "CVSS", "scenarios": [{"lang": "en", "value": "GENERAL"}], "cvssV3_1": {"version": "3.1", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH", "baseSeverity": "HIGH", "baseScore": 8.4, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}}], "workarounds": [{"lang": "en", "value": "Do not pass untrusted or unreviewed input to the --filter option of 'ros2 topic hz'."}], "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."}], "credits": [{"lang": "en", "value": "Florencia Cabral Berenfus, Ubuntu Robotics Team", "type": "finder"}], "source": {"discovery": "INTERNAL"}, "providerMetadata": {"orgId": "cc1ad9ee-3454-478d-9317-d3e869d708bc", "shortName": "canonical", "dateUpdated": "2026-09-28T21:38:08.369Z"}, "x_generator": {"engine": "cvelib 1.8.0"}, "x_gcve": [{"vulnId": "CVE-2024-42002", "recordType": "advisory"}]}, "adp": [{"metrics": [{"other": {"type": "ssvc", "content": {"timestamp": "2026-09-30T13:43:08.696167Z", "id": "CVE-2024-42002", "options": [{"Exploitation": "none"}, {"Automatable": "no"}, {"Technical Impact": "total"}], "role": "CISA Coordinator", "version": "2.0.3"}}}], "title": "CISA ADP Vulnrichment", "providerMetadata": {"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP", "dateUpdated": "2026-09-30T13:43:15.912Z"}}]}, "vulnerability-lookup:meta": {"epss": {"cve": "CVE-2024-42002", "date": "2026-11-22", "epss": "0.0016", "percentile": "0.05143"}, "nvd": "{\"cve\":{\"id\":\"CVE-2024-42002\",\"sourceIdentifier\":\"security@ubuntu.com\",\"published\":\"2026-09-28T22:17:28.617\",\"lastModified\":\"2026-11-09T10:10:00.217\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"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.\"},{\"lang\":\"es\",\"value\":\"Se ha descubierto una vulnerabilidad de inyecci\u00f3n de c\u00f3digo en el Robot Operating System 2 (ROS 2) herramienta de l\u00ednea de comandos \u2019ros2topic\u2019, que afecta a todas las distribuciones de ROS 2 desde Crystal Clemmys hasta Lyrical Luth y Rolling Ridley inclusive. La vulnerabilidad se encuentra en el verbo \u2019hz\u2019, que informa la tasa de publicaci\u00f3n de un t\u00f3pico y acepta una expresi\u00f3n Python proporcionada por el usuario mediante la opci\u00f3n --filter. Esta entrada se pasa directamente a la funci\u00f3n eval() sin saneamiento, lo que permite a un usuario local crear y ejecutar c\u00f3digo arbitrario.\"}],\"affected\":[{\"source\":\"security@ubuntu.com\",\"affectedData\":[{\"vendor\":\"Open Source Robotics Foundation\",\"product\":\"Robot Operating System 2 (ROS 2)\",\"defaultStatus\":\"unaffected\",\"packageName\":\"ros2topic\",\"modules\":[\"ros2topic\"],\"platforms\":[\"Linux\",\"MacOS\",\"Windows\"],\"programFiles\":[\"ros2topic/ros2topic/verb/hz.py\"],\"repo\":\"https://github.com/ros2/ros2cli\",\"versions\":[{\"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\",\"status\":\"affected\"}]}]}],\"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\"}}]},\"weaknesses\":[{\"source\":\"security@ubuntu.com\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-94\"},{\"lang\":\"en\",\"value\":\"CWE-95\"}]}],\"references\":[{\"url\":\"https://github.com/ros2/ros2cli/pull/1001\",\"source\":\"security@ubuntu.com\"},{\"url\":\"https://github.com/ros2/ros2cli/pull/133#discussion_r223081766\",\"source\":\"security@ubuntu.com\"}]}}", "vulnrichment": {"containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-42002\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-09-30T13:43:08.696167Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-09-30T13:43:12.945Z\"}}], \"cna\": {\"title\": \"Unsafe use of eval() method in ros2 topic hz tool\", \"source\": {\"discovery\": \"INTERNAL\"}, \"credits\": [{\"lang\": \"en\", \"type\": \"finder\", \"value\": \"Florencia Cabral Berenfus, Ubuntu Robotics Team\"}], \"impacts\": [{\"capecId\": \"CAPEC-242\", \"descriptions\": [{\"lang\": \"en\", \"value\": \"CAPEC-242 Code Injection\"}]}], \"metrics\": [{\"format\": \"CVSS\", \"cvssV4_0\": {\"Safety\": \"NOT_DEFINED\", \"version\": \"4.0\", \"Recovery\": \"NOT_DEFINED\", \"baseScore\": 8.6, \"Automatable\": \"NOT_DEFINED\", \"attackVector\": \"LOCAL\", \"baseSeverity\": \"HIGH\", \"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\", \"exploitMaturity\": \"NOT_DEFINED\", \"providerUrgency\": \"NOT_DEFINED\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"attackRequirements\": \"NONE\", \"privilegesRequired\": \"NONE\", \"subIntegrityImpact\": \"NONE\", \"vulnIntegrityImpact\": \"HIGH\", \"subAvailabilityImpact\": \"NONE\", \"vulnAvailabilityImpact\": \"HIGH\", \"subConfidentialityImpact\": \"NONE\", \"vulnConfidentialityImpact\": \"HIGH\", \"vulnerabilityResponseEffort\": \"NOT_DEFINED\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"GENERAL\"}]}, {\"format\": \"CVSS\", \"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 8.4, \"attackVector\": \"LOCAL\", \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\", \"integrityImpact\": \"HIGH\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"NONE\", \"confidentialityImpact\": \"HIGH\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"GENERAL\"}]}], \"affected\": [{\"repo\": \"https://github.com/ros2/ros2cli\", \"vendor\": \"Open Source Robotics Foundation\", \"modules\": [\"ros2topic\"], \"product\": \"Robot Operating System 2 (ROS 2)\", \"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\"], \"packageName\": \"ros2topic\", \"programFiles\": [\"ros2topic/ros2topic/verb/hz.py\"], \"defaultStatus\": \"unaffected\"}], \"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.\"}], \"references\": [{\"url\": \"https://github.com/ros2/ros2cli/pull/1001\", \"tags\": [\"patch\"]}, {\"url\": \"https://github.com/ros2/ros2cli/pull/133#discussion_r223081766\", \"tags\": [\"issue-tracking\"]}], \"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\"}, \"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.\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-95\", \"description\": \"CWE-95 Improper neutralization of directives in dynamically evaluated code ('eval injection')\"}]}, {\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-94\", \"description\": \"CWE-94 Improper Control of Generation of Code ('Code Injection')\"}]}], \"providerMetadata\": {\"orgId\": \"cc1ad9ee-3454-478d-9317-d3e869d708bc\", \"shortName\": \"canonical\", \"dateUpdated\": \"2026-09-28T21:38:08.369Z\"}}}", "cveMetadata": "{\"cveId\": \"CVE-2024-42002\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-09-30T13:43:15.912Z\", \"dateReserved\": \"2024-08-01T12:00:12.183Z\", \"assignerOrgId\": \"cc1ad9ee-3454-478d-9317-d3e869d708bc\", \"datePublished\": \"2026-09-28T21:38:08.369Z\", \"assignerShortName\": \"canonical\"}", "dataType": "CVE_RECORD", "dataVersion": "5.2"}}}
