VAITP Dataset

← Back to the dataset

CVE-2024-30695

Default ROS2 Galactic config may permit unauthenticated access via default credentials.

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

An issue was discovered in the default configurations of ROS2 Galactic Geochelone versions ROS_VERSION 2 and ROS_PYTHON_VERSION 3, allows unauthenticated attackers to gain access using default credentials. NOTE: this is disputed by multiple third parties who believe there was not reasonable evidence to determine the existence of a vulnerability.

CWE
CWE-798 (inferred)
Published
2024-04-09
OWASP
A07 Identification and Authentication Failures
Orthogonal defect classification
Interface
Code defect classification
Missing Interface
Category
Authentication, Authorization, and Session Management
Subcategory
Weak Password Policies
Accessibility scope
Remote
Impact
Unauthorized Access
Affected component
ROS2

Solution

Upgrade ROS 2 Galactic Geochelone to version 2.9.2, which contains the fix for the default‑credentials issue.

Vulnerable code sample

import os
import rclpy
from rclpy.node import Node

class MinimalNode(Node):
    def __init__(self):
        super().__init__('minimal_node')
        # VULNERABLE: uses default hard‑coded credentials
        self.username = "admin"
        self.password = "admin"
        self._setup_security()

    def _setup_security(self):
        # Placeholder for ROS2 security initialization using credentials
        self.security_context = {
            "username": self.username,
            "password": self.password,
        }

def main():
    rclpy.init()
    node = MinimalNode()
    rclpy.spin(node)
    rclpy.shutdown()

Patched code sample

import os
import rclpy
from rclpy.node import Node

class MinimalNode(Node):
    def __init__(self):
        super().__init__('minimal_node')
        # FIX: load credentials from environment instead of hard‑coding
        self.username = os.getenv("ROS2_USER")
        self.password = os.getenv("ROS2_PASS")
        self._setup_security()

    def _setup_security(self):
        # Placeholder for ROS2 security initialization using credentials
        self.security_context = {
            "username": self.username,
            "password": self.password,
        }

def main():
    rclpy.init()
    node = MinimalNode()
    rclpy.spin(node)
    rclpy.shutdown()

Cite this entry

@misc{vaitp:cve202430695,
  title        = {{Default ROS2 Galactic config may permit unauthenticated access via default credentials.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2024},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2024-30695},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-30695/}}
}

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.