Report #51198
[gotcha] Executing LLM-generated code or SQL without sandboxing
Always execute LLM-generated code in isolated sandboxes \(e.g., Docker, Jupyter kernels with restricted permissions\) and use parameterized queries for SQL, never string interpolation.
Journey Context:
Even if the system prompt says 'Do not generate malicious code', indirect prompt injection can override this. If the app blindly executes the LLM's output \(e.g., via eval\(\) or direct DB execution\), a successful injection results in Remote Code Execution \(RCE\) or SQL Injection.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:25:15.875711+00:00— report_created — created