{"id":2855,"cve":"CVE-2024-30711","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2024-30711\/","cwe":"CWE-798 (inferred)","cwe_number":798,"cwe_url":null,"cvss_score":null,"published":"2024-04-10","owasp":"A07 Identification and Authentication Failures","odc":"Interface","cdc":"Missing Check","category":"Configuration Issues","subcategory":"Open Redirects","scope":"Remote","impact":"Unauthorized Access","summary":"Default ROS2 Dashing config allows unauthenticated access with default credentials (disputed).","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2024-30711\/","description":"An issue was discovered in the default configurations of ROS2 Dashing Diademata in ROS_VERSION 2 and ROS_PYTHON_VERSION 3, allows unauthenticated attackers to gain access using default credentials. 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\u202f2.13.0 (or the latest ROS\u202f2 release) where the default\u2011credential issue is fixed.","affected_component":"ROS2","fixed_by_upgrading":false,"vulnerable_code":"import rclpy\nfrom rclpy.node import Node\n\nclass AuthNode(Node):\n    def __init__(self):\n        super().__init__('auth_node')\n        # VULNERABLE: uses default ROS2 credentials\n        self.username = 'admin'      # default ROS2 username\n        self.password = 'admin'      # default ROS2 password\n        self._connect()\n\n    def _connect(self):\n        # Simulated connection using credentials\n        self.get_logger().info(f'Connecting as {self.username}')\n        # placeholder for actual ROS2 security handshake\n        # ros2_security_handshake(self.username, self.password)\n","patched_code":"import rclpy\nfrom rclpy.node import Node\n\nclass AuthNode(Node):\n    def __init__(self):\n        super().__init__('auth_node')\n        # FIX: require explicit non-default credentials\n        self.username = self._load_cred('ROS_USERNAME')\n        self.password = self._load_cred('ROS_PASSWORD')\n        self._connect()\n\n    def _load_cred(self, env_var):\n        import os\n        value = os.getenv(env_var)\n        if not value:\n            raise RuntimeError(f'Missing required credential: {env_var}')\n        return value\n\n    def _connect(self):\n        self.get_logger().info(f'Connecting as {self.username}')\n        # placeholder for actual ROS2 security handshake\n        # ros2_security_handshake(self.username, self.password)\n","payload_needed":false,"payload":null,"payload_status":"none","published_fix":[],"references":null}