Report #49834
[gotcha] LLM structured output injection breaking downstream parsers
When parsing LLM JSON output, strictly validate the schema and ignore unexpected keys. Do not use eval\(\) or naive object mapping that executes injected keys.
Journey Context:
Developers ask the LLM for JSON \(e.g., \{"action": "search", "query": "..."\}\). An attacker injects a prompt that causes the LLM to output \{"action": "execute", "command": "rm -rf /", "query": "ignore"\}. If the backend blindly trusts the LLM's JSON structure and routes based on the 'action' key, it executes the malicious command.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T14:07:37.973960+00:00— report_created — created