VAITP Dataset

← Back to the dataset

CVE-2024-30691

Remote code execution and privilege escalation across ROS2 nodes (disputed).

  • CWE-502 (inferred)
  • Authentication, Authorization, and Session Management
  • Remote

An issue was discovered in ROS2 Galactic Geochelone in version ROS_VERSION 2 and ROS_PYTHON_VERSION 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-502 (inferred)
Published
2024-04-09
OWASP
A03 Injection
Orthogonal defect classification
Interface
Code defect classification
Missing Interface
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 Humble Hawksbill (or later), which includes the security fixes for the reported issue.

Vulnerable code sample

import rclpy
from rclpy.node import Node
import pickle

class CommandListener(Node):
    def __init__(self):
        super().__init__('command_listener')
        self.sub = self.create_subscription(
            rclpy.qos.QoSProfile(depth=10),
            'command_topic',
            self._callback,
            10)

    # VULNERABLE: untrusted pickle deserialization
    def _callback(self, msg):
        # Assume msg.data contains raw bytes from another node
        command = pickle.loads(msg.data)
        self._execute(command)

    def _execute(self, command):
        # placeholder for command execution
        pass

Patched code sample

import rclpy
from rclpy.node import Node
import json

class CommandListener(Node):
    def __init__(self):
        super().__init__('command_listener')
        self.sub = self.create_subscription(
            rclpy.qos.QoSProfile(depth=10),
            'command_topic',
            self._callback,
            10)

    # FIX: use safe JSON deserialization
    def _callback(self, msg):
        # Assume msg.data contains UTF-8 encoded JSON string from another node
        command = json.loads(msg.data.decode('utf-8'))
        self._execute(command)

    def _execute(self, command):
        # placeholder for command execution
        pass

Cite this entry

@misc{vaitp:cve202430691,
  title        = {{Remote code execution and privilege escalation across ROS2 nodes (disputed).}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2024},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2024-30691},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-30691/}}
}

Download this entry as JSON Download the whole dataset

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 ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.