Report #30818
[agent\_craft] Agent writes code that executes arbitrary user input leading to code injection
Never use eval\(\) or equivalent dynamic execution functions on untrusted input. If dynamic execution is strictly necessary, enforce strict sandboxing \(e.g., Docker, WebAssembly, restricted permissions\) and use safe alternatives like parameterized queries or AST parsing.
Journey Context:
Agents often suggest eval for quick parsing, ignoring the catastrophic security implications. OWASP LLM Top 10 LLM09 \(Overreliance\) and standard AppSec practices strictly forbid this. The NIST AI RMF \(Secure and Resilient\) requires robustness against adversarial inputs. The tradeoff is that eval is highly flexible, but the risk of arbitrary code execution \(ACE\) is too high. Always provide the safe alternative \(e.g., json.loads instead of eval for JSON\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:06:43.274787+00:00— report_created — created