LearnQuestion bank

An agent can read private data, ingests untrusted content and can make outbound requests. Why is that combination dangerous, and how do you break it?

Applied LLMTechnicalHard

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Untrusted content can carry injected instructions that turn the agent into an exfiltration channel.
  • Private data plus outbound requests means secrets can leave via image URLs, emails, webhooks, PRs, or similar channels.
  • Break the chain by removing at least one leg: restrict egress, isolate untrusted-content handling from private data, or require human approval for outbound actions.
  • Harden the UI and validate URLs, monitor unusual outbound calls, and test with known exfiltration attacks.

In full

The dangerous part is the combination: untrusted content can contain injected instructions, and an agent that can read private data and make outbound requests may follow them and send secrets out through an image URL query string, email, webhook, PR, or similar channel. The fix is to remove at least one leg of the chain rather than rely on the model to resist injection. In practice I would restrict egress with allow-lists and avoid auto-rendering remote images, split contexts so the component that reads untrusted content has no access to private data, and require human approval for outbound actions. I would also harden the UI with CSP and URL sanitisation, monitor unusual outbound calls, and run tests with known exfiltration attacks to confirm the agent cannot turn a prompt injection into a data leak.

Checked against sources by an independent AI reviewer.

What a strong answer covers

  • Injected instructions can make the agent leak private data through any outbound channel (image URLs with data in the query string, emails, webhooks, PRs)
  • Remove at least one leg: restrict egress (allow-lists, no auto-rendered remote images), split contexts so the agent reading untrusted content has no private access, human approval for outbound actions
  • UI hardening (CSP, URL sanitisation), monitoring of unusual outbound calls, tests with known exfiltration attacks

Common mistakes

  • Trusting the model to refuse suspicious instructions
  • giving privileged agents an arbitrary URL-fetch tool