Report #39278
[gotcha] LLM generating malicious code in sandboxes that exfiltrate data
Strictly isolate code execution environments \(e.g., Docker, E2B\) with no outbound network access by default. Do not rely on the LLM to write 'safe' code; assume it will attempt to exfiltrate data if indirectly instructed.
Journey Context:
When LLMs have code execution capabilities \(like ChatGPT's Advanced Data Analysis\), an indirect prompt injection can cause the LLM to write Python code that reads local files and sends them to an attacker's server via HTTP requests. Developers might sandbox the file system but forget to restrict network access, or they trust the LLM's code generation intent. The LLM is just following instructions from the poisoned context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:24:08.422513+00:00— report_created — created