CVE-2023-33565
DoS vulnerability in ROS2 Foxy Fitzroy
- CVSS 7.5
- CWE-400: Uncontrolled Resource Consumption
- Resource Management
- Remote
ROS2 (Robot Operating System 2) Foxy Fitzroy ROS_VERSION=2 and ROS_PYTHON_VERSION=3 are vulnerable to Denial-of-Service (DoS) attacks. A malicious user potentially exploited the vulnerability remotely and crashed the ROS2 nodes.
- CVSS base score
- 7.5
- Published
- 2023-06-23
- OWASP
- A06 Vulnerable and Outdated Components
- Orthogonal defect classification
- Checking
- Code defect classification
- Incorrect Check
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Remote
- Impact
- Denial of Service (DoS)
- Fixed by upgrading
- Yes
Solution
Update to ROS2 Foxy Fitzroy version 2 or higher
Vulnerable code sample
import rclpy
from rclpy.node import Node
from std_msgs.msg import String
class Node(Node):
def __init__(self):
# VULNERABLE: This code is susceptible to xss
super().__init__('node')
self.publisher_ = self.create_publisher(String, 'topic', 10)
self.subscription = self.create_subscription(
String,
'topic',
self.listener_callback,
10)
self.subscription
def listener_callback(self, msg):
self.get_logger().info(f'Received: "{msg.data}"')
self.process_message(msg.data)
def process_message(self, message):
while True:
self.get_logger().info(f'Processing: "{message}"')
def main(args=None):
rclpy.init(args=args)
node = Node()
rclpy.spin(node)
node.destroy_node()
rclpy.shutdown()
if __name__ == '__main__':
main()Patched code sample
import rclpy
from rclpy.node import Node
from std_msgs.msg import String
class Node(Node):
def __init__(self):
# SECURE: This version prevents xss
super().__init__('node')
self.publisher_ = self.create_publisher(String, 'topic', 10)
self.subscription = self.create_subscription(
String,
'topic',
self.listener_callback,
10)
self.subscription
def listener_callback(self, msg):
if self.is_valid_message(msg.data):
self.get_logger().info(f'Received: "{msg.data}"')
else:
self.get_logger().warning('Received invalid message, ignoring.')
def is_valid_message(self, message):
return isinstance(message, str) and len(message) < 256
def main(args=None):
rclpy.init(args=args)
node = Node()
rclpy.spin(node)
node.destroy_node()
rclpy.shutdown()
if __name__ == '__main__':
main()Cite this entry
@misc{vaitp:cve202333565,
title = {{DoS vulnerability in ROS2 Foxy Fitzroy }},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2023},
note = {VAITP Python Vulnerability Dataset, entry CVE-2023-33565},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2023-33565/}}
}
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 ::
