{"id":2384,"cve":"CVE-2026-51857","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-51857\/","cwe":"CWE-94 (inferred)","cwe_number":94,"cwe_url":null,"cvss_score":null,"published":"2026-09-30","owasp":"A03 Injection","odc":"Checking","cdc":"Missing Check","category":"Input Validation and Sanitization","subcategory":"Command Injection","scope":"Remote","impact":"Arbitrary Code Execution","summary":"CodeExecutionToolkit runs model\u2011generated Python via SubprocessInterpreter without approval.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-51857\/","description":"In camel-ai camel 0.2.91a1, v0.2.91a2 and v0.2.91a3, CodeExecutionToolkit can run model-produced Python code through SubprocessInterpreter without an approval boundary.","solution":"Upgrade to camel\u2011ai\u202fcamel\u202f\u2265\u202f0.2.92, which removes the unapproved SubprocessInterpreter execution.","affected_component":"camel-ai","fixed_by_upgrading":true,"vulnerable_code":"from camel_ai.toolkits import CodeExecutionToolkit\nfrom camel_ai.interpreters import SubprocessInterpreter\n\nclass MyToolkit(CodeExecutionToolkit):\n    def run_model_code(self, code: str):\n        # VULNERABLE: executes arbitrary model-generated code without approval\n        interpreter = SubprocessInterpreter()\n        return interpreter.execute(code)\n","patched_code":"from camel_ai.toolkits import CodeExecutionToolkit\nfrom camel_ai.interpreters import SubprocessInterpreter\n\nclass MyToolkit(CodeExecutionToolkit):\n    def run_model_code(self, code: str):\n        # FIX: requires explicit approval before execution\n        if not code.strip().startswith(\"APPROVED:\"):\n            raise ValueError(\"Code execution not approved\")\n        interpreter = SubprocessInterpreter()\n        return interpreter.execute(code)\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[],"references":null}