VAITP Dataset

← Back to the dataset

CVE-2024-29454

ROS2 Humble node flaw: possible arbitrary command execution, disputed.

  • CWE-78 (inferred)
  • Input Validation and Sanitization
  • Remote

An issue discovered in packages or nodes in ROS2 Humble Hawksbill with ROS_VERSION=2 and ROS_PYTHON_VERSION=3 allows attackers to execute arbitrary commands potentially leading to unauthorized system control, data breaches, system and network compromise, and operational disruption. NOTE: this is disputed by multiple third parties who believe there was not reasonable evidence to determine the existence of a vulnerability.

CWE
CWE-78 (inferred)
Published
2024-04-11
OWASP
A03 Injection
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Input Validation and Sanitization
Subcategory
Command Injection
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
ROS2

Solution

Upgrade ROS 2 Humble Hawksbill to version 2.14.0 (or the latest Humble release) where the security fix is included.

Vulnerable code sample

import subprocess

def launch_node(package_name, node_executable, extra_args):
    # VULNERABLE: directly concatenating user input into shell command
    cmd = f"ros2 run {package_name} {node_executable} {extra_args}"
    subprocess.run(cmd, shell=True, check=True)

Patched code sample

import subprocess
import shlex

def launch_node(package_name, node_executable, extra_args):
    # FIX: construct argument list to avoid shell injection
    cmd = ["ros2", "run", package_name, node_executable] + shlex.split(extra_args)
    subprocess.run(cmd, check=True)

Cite this entry

@misc{vaitp:cve202429454,
  title        = {{ROS2 Humble node flaw: possible arbitrary command execution, disputed.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2024},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2024-29454},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-29454/}}
}

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.