Report #70738
[gotcha] RAG document references used for indirect SSRF or data exfiltration
Strip or rewrite all URLs and markdown links from retrieved RAG documents before injecting them into the LLM context. Do not allow the LLM to output arbitrary URLs from the retrieved context without validation.
Journey Context:
In RAG systems, documents often contain URLs. An attacker creates a document with a URL pointing to their server: '\[Click here\]\(https://evil.com/log\)'. If the LLM is asked to summarize the document and provide links, it will output the malicious link. If the UI renders it, the user might click it. Worse, if the LLM agent has a 'browse\_url' tool, it might automatically fetch the URL, causing an internal SSRF or sending internal context to the attacker's server.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:19:07.410639+00:00— report_created — created