Governance, Risk, and Compliance
A web app renders LLM responses directly into pages without checks, allowing injected scripts to run. Which control best addresses this?
Show the answer
Correct answerA. Validate and encode model output
AWhy this is right: Treating model output as untrusted input and encoding it prevents injected scripts from running in the browser.
BWhy not this: Vetting training data counters poisoning. It does not sanitize responses at render time.
CWhy not this: Signature checks protect model artifacts in the supply chain. They do not clean generated output.
DWhy not this: Rate limits counter model denial of service. They do not stop scripts in responses from executing.
Insecure output handling means downstream components trust model output, so output must be treated as untrusted and validated or encoded before use. Rate limiting addresses resource exhaustion, not malicious content in responses.