{"id":2844,"cve":"CVE-2024-30726","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2024-30726\/","cwe":"CWE-78 (inferred)","cwe_number":78,"cwe_url":null,"cvss_score":null,"published":"2024-04-10","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 ROS Kinetic Kame allows arbitrary code execution, privilege escalation.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2024-30726\/","description":"A shell injection vulnerability was discovered in ROS (Robot Operating System) Kinetic Kame in ROS_VERSION 1 and ROS_ PYTHON_VERSION 3, allows remote attackers to execute arbitrary code, escalate privileges, and obtain sensitive information due to the way ROS 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 Kinetic Kame to the latest ROS Kinetic release (e.g., ROS\u202fKinetic\u202f1.15.13) which includes the patched handling of shell command execution.","affected_component":"ROS","fixed_by_upgrading":false,"vulnerable_code":"import subprocess\n\ndef run_ros_command(topic):\n    # VULNERABLE: unsanitized input passed to shell\n    cmd = f\"rostopic echo {topic}\"\n    subprocess.run(cmd, shell=True, check=True)\n","patched_code":"import subprocess\nimport shlex\n\ndef run_ros_command(topic):\n    # FIX: avoid shell, pass arguments as a list\n    cmd = [\"rostopic\", \"echo\", topic]\n    subprocess.run(cmd, check=True)\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[],"references":null}