CVE-2024-30706
Remote code execution in ROS2 Dashing (disputed, insufficient evidence).
- CWE-94 (inferred)
- Authentication, Authorization, and Session Management
- Remote
An issue was discovered in ROS2 Dashing Diademata versions ROS_VERSION is 2 and ROS_PYTHON_VERSION is 3, allows remote attackers to execute arbitrary code, escalate privileges, obtain sensitive information, and gain unauthorized access to multiple ROS2 nodes. NOTE: this is disputed by multiple third parties who believe there was not reasonable evidence to determine the existence of a vulnerability.
- CWE
- CWE-94 (inferred)
- Published
- 2024-04-09
- OWASP
- A01 Broken Access Control
- Orthogonal defect classification
- Function
- Code defect classification
- Missing Check
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Privilege Escalation
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- ROS2
Solution
Upgrade ROS 2 to version Foxy Fitzroy (or later) where the issue is resolved.
Vulnerable code sample
import rclpy
from rclpy.node import Node
class CommandNode(Node):
def __init__(self):
super().__init__('command_node')
self.subscription = self.create_subscription(
String,
'cmd_topic',
self.cmd_callback,
10)
# VULNERABLE: uses eval on untrusted data
def cmd_callback(self, msg):
# msg.data is expected to be a Python expression
result = eval(msg.data) # unsafe execution of attacker-controlled code
self.get_logger().info(f'Executed result: {result}')Patched code sample
import rclpy
from rclpy.node import Node
import ast
class CommandNode(Node):
def __init__(self):
super().__init__('command_node')
self.subscription = self.create_subscription(
String,
'cmd_topic',
self.cmd_callback,
10)
# FIX: replace eval with safe literal evaluation
def cmd_callback(self, msg):
# msg.data is expected to be a literal expression
result = ast.literal_eval(msg.data) # safely parse without code execution
self.get_logger().info(f'Executed result: {result}')Cite this entry
@misc{vaitp:cve202430706,
title = {{Remote code execution in ROS2 Dashing (disputed, insufficient evidence).}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2024},
note = {VAITP Python Vulnerability Dataset, entry CVE-2024-30706},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-30706/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
