CVE-2024-41148: Unsafe use of eval() method in rostopic hz tool
Vulnerability summary
CVE-2024-41148 is a high (CVSS 7.8) Improper Control of Generation of Code vulnerability in open source robotics foundation robot operating system (ros). EPSS estimates a 0.22% chance of exploitation in the next 30 days, higher than 13% of scored vulnerabilities.
Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 17-07-2025PublishedVulnerability first disclosed.
- 18-07-2025Last modifiedVulnerability information updated.
Description
A code injection vulnerability has been discovered in the Robot Operating System (ROS) 'rostopic' command-line tool, affecting ROS distributions Noetic Ninjemys and earlier. 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.
CVSS metrics
4 scores · 4 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- NVDNIST7.8HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.22%
Chance of exploitation in the next 30 days
Percentile
13%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.22% on 21-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-94Improper Control of Generation of CodeThe product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
- CWE-95Improper Neutralization of Directives in Dynamically Evaluated CodeThe product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval").
Affected systems
Known conditions: local access, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Debian1 product
- ros-ros-commAll versions (No fix recorded)
Open source robotics foundation1 product
- robot operating system (ros)Noetic Ninjemys | Melodic Morenia | Kinetic Kame | Indigo Igloo
Openrobotics1 product
- robot_operating_systemindigo_igloo | kinetic_kame | melodic_morenia | noetic_ninjemys
Ubuntu1 product
- ros-ros-commAll versions (No fix recorded)
4 vendors · 4 products