VAITP Dataset

← Back to the dataset

CVE-2024-30726

Shell injection in ROS Kinetic Kame allows arbitrary code execution, privilege escalation.

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

A shell injection vulnerability was discovered in ROS (Robot Operating System) Kinetic Kame in ROS_VERSION 1 and ROS_ PYTHON_VERSION 3, allows remote attackers to execute arbitrary code, escalate privileges, and obtain sensitive information due to the way ROS handles shell command execution in components like command interpreters or interfaces that process external inputs. 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-10
OWASP
A03 Injection
Orthogonal defect classification
Checking
Code defect classification
Incorrect Check
Category
Input Validation and Sanitization
Subcategory
Command Injection
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
ROS

Solution

Upgrade ROS Kinetic Kame to the latest ROS Kinetic release (e.g., ROS Kinetic 1.15.13) which includes the patched handling of shell command execution.

Vulnerable code sample

import subprocess

def run_ros_command(topic):
    # VULNERABLE: unsanitized input passed to shell
    cmd = f"rostopic echo {topic}"
    subprocess.run(cmd, shell=True, check=True)

Patched code sample

import subprocess
import shlex

def run_ros_command(topic):
    # FIX: avoid shell, pass arguments as a list
    cmd = ["rostopic", "echo", topic]
    subprocess.run(cmd, check=True)

Cite this entry

@misc{vaitp:cve202430726,
  title        = {{Shell injection in ROS Kinetic Kame allows arbitrary code execution, privilege escalation.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2024},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2024-30726},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-30726/}}
}

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.