CVE-2024-30737
Remote code execution in ROS Kinetic via malicious packages/nodes (disputed).
- CWE-494 (inferred)
- Input Validation and Sanitization
- Remote
An issue was discovered in ROS Kinetic Kame in ROS_VERSION 1 and ROS_PYTHON_VERSION 3, allows remote attackers to execute arbitrary code via packages or nodes within the ROS system. NOTE: this is disputed by multiple third parties who believe there was not reasonable evidence to determine the existence of a vulnerability.
- CWE
- CWE-494 (inferred)
- Published
- 2024-04-10
- OWASP
- A06 Vulnerable and Outdated Components
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Input Validation and Sanitization
- Subcategory
- Command Injection
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- ROS
Solution
Upgrade ROS to a newer, patched distribution (e.g., ROS Melodic Morenia or later such as ROS Noetic) to mitigate this issue.
Vulnerable code sample
import os
import rospy
def launch_node():
# VULNERABLE: concatenates untrusted ROS param into shell command
cmd = rospy.get_param('~extra_args', '')
os.system("rosrun my_pkg my_node " + cmd)Patched code sample
import os
import subprocess
import rospy
def launch_node():
# FIX: use list args to avoid shell injection
cmd = rospy.get_param('~extra_args', '')
args = ["rosrun", "my_pkg", "my_node"] + cmd.split()
subprocess.run(args, check=True)Cite this entry
@misc{vaitp:cve202430737,
title = {{Remote code execution in ROS Kinetic via malicious packages/nodes (disputed).}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2024},
note = {VAITP Python Vulnerability Dataset, entry CVE-2024-30737},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-30737/}}
}
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 ::
