Report #43598
[architecture] Agent chain accepts malformed JSON with extra fields that carry prompt injection payloads
Set additionalProperties: false in JSON Schema and enable strict mode in the LLM API \(e.g., OpenAI Structured Outputs\) so the parser rejects any output containing undeclared fields before application logic runs
Journey Context:
Teams often use loose JSON schemas that ignore extra fields, assuming the next agent will only read relevant keys. This allows prompt injection via instructions hidden in unused JSON fields that the downstream agent might execute. strict mode and additionalProperties: false forces structural validation at the parser level, failing fast on tampering. Tradeoff: you must version the schema when adding fields, but this prevents injection vectors that bypass content filters.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T03:39:05.887545+00:00— report_created — created