CVE-2024-30661
Unauthorized ROS Melodic info leak via ROS_VERSION=1 & ROS_PYTHON_VERSION=3.
- CWE-284 (inferred)
- Authentication, Authorization, and Session Management
- Remote
An unauthorized access vulnerability has been discovered in ROS Melodic Morenia versions where ROS_VERSION is 1 and ROS_PYTHON_VERSION is 3. This vulnerability could potentially allow a malicious user to gain unauthorized information access to multiple ROS nodes remotely. Unauthorized information access to these nodes could result in compromised system integrity, the execution of arbitrary commands, and disclosure of sensitive information. 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
- A01 Broken Access Control
- Orthogonal defect classification
- Interface
- Code defect classification
- Missing Check
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Privilege Escalation
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Affected component
- ROS
Solution
Upgrade to ROS Melodic Morenia version 1.14.12, which includes the patch for this issue.
Vulnerable code sample
import os
import rospy
from std_msgs.msg import String
def init_node():
# VULNERABLE: missing authentication check for remote ROS master
rospy.init_node('listener', anonymous=True, disable_signals=True)
def callback(data):
rospy.loginfo(rospy.get_caller_id() + " heard %s", data.data)
def listener():
init_node()
rospy.Subscriber("chatter", String, callback)
rospy.spin()Patched code sample
import os
import rospy
from std_msgs.msg import String
def init_node():
# FIX: enforce token verification before connecting to ROS master
token = os.getenv('ROS_AUTH_TOKEN')
if not token or token != 'expected_secure_token':
raise PermissionError("Invalid ROS authentication token")
rospy.init_node('listener', anonymous=True, disable_signals=True)
def callback(data):
rospy.loginfo(rospy.get_caller_id() + " heard %s", data.data)
def listener():
init_node()
rospy.Subscriber("chatter", String, callback)
rospy.spin()Cite this entry
@misc{vaitp:cve202430661,
title = {{Unauthorized ROS Melodic info leak via ROS_VERSION=1 & ROS_PYTHON_VERSION=3.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2024},
note = {VAITP Python Vulnerability Dataset, entry CVE-2024-30661},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-30661/}}
}
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 ::
