VAITP Dataset

← Back to the dataset

CVE-2024-30675

Unauthorized ROS2 Iron node injection allowing remote privilege escalation (disputed).

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

Unauthorized node injection vulnerability in ROS2 Iron Irwini in ROS_VERSION 2 and ROS_PYTHON_VERSION 3. This vulnerability could allow a malicious user to escalate privileges by injecting malicious ROS2 nodes into the system remotely. NOTE: this is disputed by multiple third parties who believe there was not reasonable evidence to determine the existence of a vulnerability.

CWE
CWE-284 (inferred)
Published
2024-04-08
OWASP
A08 Software and Data Integrity Failures
Orthogonal defect classification
Interface
Code defect classification
Incorrect Interface
Category
Authentication, Authorization, and Session Management
Subcategory
Privilege Escalation
Accessibility scope
Remote
Impact
Privilege Escalation
Affected component
ROS2

Solution

Upgrade ROS 2 to version Iron Irwini 2.8.0 (or later), where the unauthorized node injection issue is addressed.

Vulnerable code sample

import rclpy
from rclpy.node import Node

def create_user_node(node_name: str) -> Node:
    # VULNERABLE: creates node with unchecked name allowing privilege escalation
    return Node(node_name)

def main():
    rclpy.init()
    # Assume node_name comes from untrusted remote request
    remote_node_name = get_remote_node_name()
    user_node = create_user_node(remote_node_name)
    rclpy.spin(user_node)
    rclpy.shutdown()

def get_remote_node_name():
    # placeholder for untrusted input source
    return "malicious_node"

Patched code sample

import rclpy
from rclpy.node import Node
import re

def create_user_node(node_name: str) -> Node:
    # FIX: validate node name to prevent unauthorized injection
    if not re.fullmatch(r'[a-zA-Z_][a-zA-Z0-9_]*', node_name):
        raise ValueError("Invalid node name")
    return Node(node_name)

def main():
    rclpy.init()
    remote_node_name = get_remote_node_name()
    user_node = create_user_node(remote_node_name)
    rclpy.spin(user_node)
    rclpy.shutdown()

def get_remote_node_name():
    return "malicious_node"

Cite this entry

@misc{vaitp:cve202430675,
  title        = {{Unauthorized ROS2 Iron node injection allowing remote privilege escalation (disputed).}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2024},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2024-30675},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-30675/}}
}

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.