CVE-2024-41921
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-07-17

Last updated on: 2025-08-26

Assigner: Canonical Ltd.

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 'echo' verb, which allows a user to introspect a ROS 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 Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-07-17
Last Modified
2025-08-26
Generated
2026-05-06
AI Q&A
2025-07-17
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 4 associated CPEs
Vendor Product Version / Range
openrobotics robot_operating_system indigo_igloo
openrobotics robot_operating_system kinetic_kame
openrobotics robot_operating_system melodic_morenia
openrobotics robot_operating_system noetic_ninjemys
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The 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-95 The 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").
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a code injection flaw in the Robot Operating System (ROS) 'rostopic' command-line tool, specifically in the 'echo' verb. It affects ROS distributions Noetic Ninjemys and earlier. The issue arises because the 'echo' command accepts a user-provided Python expression via the --filter option, which is passed directly to the eval() function without any sanitization. This allows a local user to execute arbitrary code by crafting a malicious input.


How can this vulnerability impact me? :

This vulnerability can have a high impact as it allows a local user to execute arbitrary code on the system running the vulnerable ROS distribution. This can lead to complete compromise of confidentiality, integrity, and availability of the affected system, potentially allowing unauthorized access, data manipulation, or disruption of services.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by identifying usage of the 'rostopic echo' command with the '--filter' option, which accepts unsanitized Python expressions. Monitoring command-line usage or scripts invoking 'rostopic echo --filter' can help detect potential exploitation attempts. For example, you can search shell history or running processes for 'rostopic echo --filter'. A sample command to detect this might be: `ps aux | grep 'rostopic echo --filter'` or searching bash history with `grep 'rostopic echo --filter' ~/.bash_history`. Additionally, monitoring for unexpected Python code execution triggered by this command could indicate exploitation.


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include avoiding the use of the 'rostopic echo' command with the '--filter' option, especially on systems running ROS Noetic Ninjemys or earlier. Restrict local user access to systems where this vulnerability exists to prevent arbitrary code execution. Planning migration from ROS 1 to ROS 2 is strongly recommended, as ROS 1 Noetic Ninjemys will reach end-of-life in May 2025, after which no security updates will be provided. If migration is not immediately possible, consider applying any available patches or using extended security maintenance services offered by Canonical or community support options. Additionally, review and restrict user permissions to limit the ability to execute potentially malicious commands. [1]


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart