CVE-2024-42002
published high CVSS 4.0 · 8.6Unsafe use of eval() method in ros2 topic hz tool
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Open Source Robotics Foundation | — | ros2topicRobot Operating System 2 (ROS 2) · Rolling Ridley · Lyrical Luth · Kilted Kaiju · Jazzy Jalisco · Iron Irwini · Humble Hawksbill · Galactic Geochelone · Foxy Fitzroy · Eloquent Elusor · Dashing Diademata · Crystal Clemmys · Other versions: unaffected · Platforms: Linux, MacOS, Windows | Affected | Not stated | canonical |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.6 / 10
- Severity
- high
- Provider
- canonical · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.4 | high | canonical · cna | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Open Source Robotics Foundation | Robot Operating System 2 (ROS 2) | Rolling Ridley (affected · custom)Lyrical Luth (affected · custom)Kilted Kaiju (affected · custom)Jazzy Jalisco (affected · custom)Iron Irwini (affected · custom)Humble Hawksbill (affected · custom)Galactic Geochelone (affected · custom)Foxy Fitzroy (affected · custom)Eloquent Elusor (affected · custom)Dashing Diademata (affected · custom)Crystal Clemmys (affected · custom)Default: unaffected | canonical · cna |
Weaknesses
2- 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')
References
2Provider assertions
2canonical · cna
Unsafe use of eval() method in ros2 topic hz tool
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- b38f0d1bde1733957fe4bfb72adf63ea0637e3ed52e2180ac8c7e23670a5da53
- Ingested
- 30 Sep 2026, 15:12:46 UTC
- Source record
- Official CVE record