CVE-2024-41148
Unsafe use of eval() method in rostopic hz tool
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.
INFO
Published Date :
July 17, 2025, 8:15 p.m.
Last Modified :
Aug. 26, 2025, 5:51 p.m.
Remotely Exploit :
No
Source :
[email protected]
Affected Products
                                            The following products are affected by CVE-2024-41148
                                            vulnerability.
                                            Even if cvefeed.io is aware of the exact versions of the
                                            products
                                            that
                                            are
                                            affected, the information is not represented in the table below.
                                        
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source | 
|---|---|---|---|---|---|---|
| CVSS 3.1 | HIGH | [email protected] | 
Solution
- Update ROS to a non-vulnerable version.
 - Avoid using the 'rostopic hz --filter' option.
 - Sanitize user input before passing to eval().
 
References to Advisories, Solutions, and Tools
                                            Here, you will find a curated list of external links that provide in-depth
                                            information, practical solutions, and valuable tools related to
                                            CVE-2024-41148.
                                        
| URL | Resource | 
|---|---|
| https://www.ros.org/blog/noetic-eol/ | Product | 
CWE - Common Weakness Enumeration
            While CVE identifies
            specific instances of vulnerabilities, CWE categorizes the common flaws or
            weaknesses that can lead to vulnerabilities. CVE-2024-41148 is
            associated with the following CWEs:
        
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
            (CAPEC)
            stores attack patterns, which are descriptions of the common attributes and
            approaches employed by adversaries to exploit the CVE-2024-41148
            weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
			The following list is the news that have been mention
			CVE-2024-41148 vulnerability anywhere in the article.
		
                The following table lists the changes that have been made to the
                CVE-2024-41148 vulnerability over time.
            
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
- 
                            
Initial Analysis by [email protected]
Aug. 26, 2025
Action Type Old Value New Value Added CWE CWE-94 Added CPE Configuration OR *cpe:2.3:o:openrobotics:robot_operating_system:indigo_igloo:*:*:*:*:*:*:* *cpe:2.3:o:openrobotics:robot_operating_system:kinetic_kame:*:*:*:*:*:*:* *cpe:2.3:o:openrobotics:robot_operating_system:melodic_morenia:*:*:*:*:*:*:* *cpe:2.3:o:openrobotics:robot_operating_system:noetic_ninjemys:*:*:*:*:*:*:* Added Reference Type Canonical Ltd.: https://www.ros.org/blog/noetic-eol/ Types: Product  - 
                            
New CVE Received by [email protected]
Jul. 17, 2025
Action Type Old Value New Value Added 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. Added CVSS V3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Added CWE CWE-94 Added CWE CWE-95 Added Reference https://www.ros.org/blog/noetic-eol/