{"id":2878,"cve":"CVE-2024-30680","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2024-30680\/","cwe":"CWE-78 (inferred)","cwe_number":78,"cwe_url":null,"cvss_score":null,"published":"2024-04-09","owasp":"A03 Injection","odc":"Checking","cdc":"Incorrect Check","category":"Input Validation and Sanitization","subcategory":"Command Injection","scope":"Remote","impact":"Arbitrary Code Execution","summary":"Shell injection in ROS2 Iron Irwini allows arbitrary code execution; disputed.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2024-30680\/","description":"Shell injection vulnerability was discovered in ROS2 (Robot Operating System 2) Iron Irwini in versions ROS_VERSION 2 and ROS_PYTHON_VERSION 3, allows attackers to execute arbitrary code escalate privileges, and obtain sensitive information due to the way ROS2 handles shell command execution in components like command interpreters or interfaces that process external inputs. 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\u202fIron\u202fIrwini to version\u202f2.0.1 (or later) which contains the fix for this issue.","affected_component":"ROS2","fixed_by_upgrading":false,"vulnerable_code":"import subprocess\n\ndef execute_user_command(command):\n    # VULNERABLE: uses shell=True with unsanitized input\n    result = subprocess.run(command, shell=True, capture_output=True, text=True)\n    return result.stdout\n","patched_code":"import subprocess\n\ndef execute_user_command(command):\n    # FIX: avoid shell=True and pass args as a list\n    result = subprocess.run(command.split(), capture_output=True, text=True)\n    return result.stdout\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[],"references":null}