VAITP Dataset

← Back to the dataset

CVE-2026-51857

CodeExecutionToolkit runs model‑generated Python via SubprocessInterpreter without approval.

  • CWE-94 (inferred)
  • Input Validation and Sanitization
  • Remote

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.

CWE
CWE-94 (inferred)
Published
2026-09-30
OWASP
A03 Injection
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Input Validation and Sanitization
Subcategory
Command Injection
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
camel-ai
Fixed by upgrading
Yes

Solution

Upgrade to camel‑ai camel ≥ 0.2.92, which removes the unapproved SubprocessInterpreter execution.

Vulnerable code sample

from camel_ai.toolkits import CodeExecutionToolkit
from camel_ai.interpreters import SubprocessInterpreter

class MyToolkit(CodeExecutionToolkit):
    def run_model_code(self, code: str):
        # VULNERABLE: executes arbitrary model-generated code without approval
        interpreter = SubprocessInterpreter()
        return interpreter.execute(code)

Patched code sample

from camel_ai.toolkits import CodeExecutionToolkit
from camel_ai.interpreters import SubprocessInterpreter

class MyToolkit(CodeExecutionToolkit):
    def run_model_code(self, code: str):
        # FIX: requires explicit approval before execution
        if not code.strip().startswith("APPROVED:"):
            raise ValueError("Code execution not approved")
        interpreter = SubprocessInterpreter()
        return interpreter.execute(code)

Payload

__VAITP_MODEL_REFUSED__

Cite this entry

@misc{vaitp:cve202651857,
  title        = {{CodeExecutionToolkit runs model‑generated Python via SubprocessInterpreter without approval.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-51857},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-51857/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::