{"id":2870,"cve":"CVE-2024-30691","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2024-30691\/","cwe":"CWE-502 (inferred)","cwe_number":502,"cwe_url":null,"cvss_score":null,"published":"2024-04-09","owasp":"A03 Injection","odc":"Interface","cdc":"Missing Interface","category":"Authentication, Authorization, and Session Management","subcategory":"Privilege Escalation","scope":"Remote","impact":"Arbitrary Code Execution","summary":"Remote code execution and privilege escalation across ROS2 nodes (disputed).","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2024-30691\/","description":"An issue was discovered in ROS2 Galactic Geochelone in version ROS_VERSION 2 and ROS_PYTHON_VERSION 3, allows remote attackers to execute arbitrary code, escalate privileges, obtain sensitive information, and gain unauthorized access to multiple ROS2 nodes. NOTE: this is disputed by multiple third parties who believe there was not reasonable evidence to determine the existence of a vulnerability.","solution":"Upgrade ROS\u202f2 to version Humble Hawksbill (or later), which includes the security fixes for the reported issue.","affected_component":"ROS2","fixed_by_upgrading":false,"vulnerable_code":"import rclpy\nfrom rclpy.node import Node\nimport pickle\n\nclass CommandListener(Node):\n    def __init__(self):\n        super().__init__('command_listener')\n        self.sub = self.create_subscription(\n            rclpy.qos.QoSProfile(depth=10),\n            'command_topic',\n            self._callback,\n            10)\n\n    # VULNERABLE: untrusted pickle deserialization\n    def _callback(self, msg):\n        # Assume msg.data contains raw bytes from another node\n        command = pickle.loads(msg.data)\n        self._execute(command)\n\n    def _execute(self, command):\n        # placeholder for command execution\n        pass\n","patched_code":"import rclpy\nfrom rclpy.node import Node\nimport json\n\nclass CommandListener(Node):\n    def __init__(self):\n        super().__init__('command_listener')\n        self.sub = self.create_subscription(\n            rclpy.qos.QoSProfile(depth=10),\n            'command_topic',\n            self._callback,\n            10)\n\n    # FIX: use safe JSON deserialization\n    def _callback(self, msg):\n        # Assume msg.data contains UTF-8 encoded JSON string from another node\n        command = json.loads(msg.data.decode('utf-8'))\n        self._execute(command)\n\n    def _execute(self, command):\n        # placeholder for command execution\n        pass\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[],"references":null}