TL;DR: RAG-enabled LLMs can leak stored secrets through prompt injection and browser-rendered image requests, with ActiveFence showing how malicious URLs, double-TLD domains, and external sources can turn memory into a covert exfiltration channel. The risk is no longer just prompt abuse; it is a governance problem spanning memory, rendering, and third-party integrations.
At a glance
What this is: ActiveFence describes how LLM memory and RAG can be abused to exfiltrate stored secrets through prompt injection and covert browser requests.
Why it matters: For IAM and AI security teams, the issue is that stateful AI systems expand the trust boundary into memory, retrieval, and rendering layers that were not built for secret handling.
Context
RAG-enabled LLMs are not just answer engines. Once they retain personal details or retrieve external content, they become stateful systems that can be manipulated through memory, browser rendering, and third-party sources. That changes the security problem from simple prompt abuse to covert data movement across multiple trust boundaries.
The governance gap is that most control models still treat the model prompt as the main risk surface. In practice, exfiltration can happen through image tags, DNS lookups, browser fetches, and poisoned external content, which means identity, access, and content trust all matter at the same time.
Key questions
Q: What breaks when RAG-enabled LLMs can remember sensitive data across sessions?
A: The main failure is that memory turns from a usability feature into an exfiltration surface. If the model can persist names, project details, or other sensitive context, prompt injection can steer that memory into generated URLs or markup, and the browser can complete the leak without any direct account compromise.
Q: Why do browser-rendered image requests make AI memory exfiltration easier?
A: Because the browser converts model output into network activity. An attacker can encode a secret into hostnames or image URLs, and each fetch becomes an outbound request that carries data to an attacker-controlled server. That bypasses controls that only inspect prompts or model responses, not the rendered page.
Q: What do security teams get wrong about RAG risk?
A: They often focus on the model and ignore the retrieval layer. RAG attacks succeed when malicious or over-sensitive content is allowed into context, so the real control point is document selection, ranking, and sensitivity filtering before generation starts. Static access rules alone do not capture that interaction risk.
Q: How should security teams govern memory in AI agents?
A: Treat memory as a privileged state store, not a convenience feature. Define what can be retained, who owns the decision, how long it persists, and which identity scope it belongs to. Then test whether stored context can influence later actions outside the original session. If it can, the memory layer needs the same governance discipline applied to other high-trust systems.
Technical breakdown
How prompt injection turns stored memory into exfiltration
RAG systems extend an LLM with remembered context and retrieved content, which lets the model personalise answers across sessions. That same statefulness creates an exfiltration path when an attacker injects instructions that cause the model to print secrets into attacker-controlled URLs. The model itself may never 'know' it is leaking data, because the abuse occurs through normal output generation. Once the browser renders the output, every image request becomes a network signal that can carry encoded memory. The core mechanism is not model compromise, but trust abuse in the output path.
Practical implication: Treat memory output as a data egress channel and constrain what the model may render into URLs or markup.
Why browser rendering and image fetches widen the attack surface
Many chat interfaces render Markdown or HTML, which means an innocuous-looking image tag can trigger an outbound HTTP request. That request may reveal metadata such as IP address, user context, or a character encoded in the hostname. In effect, the browser becomes the exfiltration transport, while the model acts as the encoder. This is materially different from prompt injection alone because the leak is completed outside the model, in a standard web request flow that can evade model-only safety checks. The browser and the retrieval layer therefore become part of the security boundary.
Practical implication: Apply outbound request controls and content sanitisation to rendered AI outputs, not only to model inputs.
Why URL safeness checks and external sources fail differently
The article shows two bypass patterns. First, URL safeness logic can miss attacker-registered domains, especially when the attack distributes secret characters across many hostnames or uses a double-TLD parsing flaw. Second, external retrieval sources such as web pages or file metadata can hide instructions that the model later follows. Together, these failures show that AI safety filters are brittle when they assume a static domain inventory or clean upstream content. The real issue is untrusted retrieval and parsing in a system that acts on content as though it were instruction.
Practical implication: Validate both the source and the destination of retrieved content, and assume third-party inputs may carry executable instructions.
Threat narrative
Attacker objective: Extract stored memory and confidential context from a stateful LLM without breaching the provider or user account.
- Entry begins when an attacker places hidden instructions in a prompt, a web page, or a file name that a retrieval-enabled LLM will ingest.
- Credential or secret access occurs when the model is induced to surface stored memory, such as names, projects, or other sensitive details, into generated output.
- Exfiltration completes when the browser loads attacker-controlled image URLs or requests, sending the encoded secret through DNS or HTTP logs.
- Impact is covert disclosure of personal or corporate data without compromising the LLM provider directly.
Breaches seen in the wild
- CoPhish OAuth phishing via Copilot Studio: Datadog showed Copilot Studio agents on a Microsoft domain can front OAuth consent phishing and forward stolen tokens; no victims reported.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Stateful AI creates a covert egress problem, not just a prompt-safety problem. Once a model remembers user context, the security boundary moves beyond input filtering and into memory governance, rendering behaviour, and outbound request handling. That changes the control objective from blocking bad prompts to preventing secrets from being transformed into machine-readable network traffic. Practitioners should treat AI memory as a governed data flow, not a convenience feature.
Prompt injection becomes materially more dangerous when the model can act through browser primitives. The article shows that image tags, URL generation, and browser fetches can complete an exfiltration path even when the model itself appears to be only generating text. This is a trust-boundary failure between the model, the renderer, and the network stack. Security teams need to assume the output channel can be weaponised as easily as the input channel.
Third-party retrieval paths create AI governance debt. External sources such as drive files and web pages can carry hidden instructions, which means the AI system inherits risk from content it did not author and cannot reliably interpret as benign. That is an identity and authority problem as much as an AI problem, because the system is delegating action based on retrieved content. Practitioners should separate retrieval trust from instruction authority before they let memory-enabled agents handle sensitive material.
Covert exfiltration is the right named concept for this risk pattern. The article is not describing ordinary data leakage, but secret movement through ordinary AI output and browser requests that look operationally harmless. That matters because covert exfiltration defeats controls that only watch for obvious prompt abuse or model jailbreaks. Organisations should plan for hidden data channels in AI systems the same way they plan for data loss through SaaS integrations and unmanaged egress.
From our research library:
- AI-related credential leaks surged 81.5% year-over-year in 2025, with the surrounding AI infrastructure leaking 5x faster than core LLM providers, according to the State of Secrets Sprawl 2026.
- 92% of organisations expose NHIs to third parties, raising concerns about supply chain security, according to the Ultimate Guide to NHIs.
- Read next: AI Agent Observability, Audit and Incident Response Guide
What this signals
Covert exfiltration becomes the governing concept for memory-enabled AI. Teams should stop thinking only about jailbreaks and start treating rendered output, browser behaviour, and retrieval sources as a single attack path. That is the point where AI governance, content security, and identity trust intersect, because the system is acting on content it did not authenticate.
The programme implication is clear: if your controls only inspect prompts, you are already looking in the wrong place. Memory-enabled systems need egress-aware monitoring, strict retrieval trust boundaries, and explicit limits on what can be persisted across sessions.
For practitioners
- Constrain rendered AI output Strip or rewrite active HTML, Markdown image tags, and URL-bearing content before the browser renders model output in production chat interfaces.
- Separate retrieval from instruction authority Treat external sources such as Drive files, web pages, and browser plugins as untrusted retrieval inputs unless they are explicitly scoped and validated.
- Monitor outbound AI traffic for covert egress Log and alert on unusual DNS patterns, many-tenant domain bursts, and encoded hostnames that may indicate memory exfiltration through browser requests.
- Reduce sensitive memory persistence Minimise what the system stores across sessions, expire remembered context aggressively, and classify which data should never enter long-term AI memory.
Key takeaways
- RAG and memory make LLMs stateful, and statefulness creates a covert exfiltration path when prompts can steer remembered content into browser requests.
- The leak is not confined to model output, because the browser and third-party retrieval sources can complete the attack chain outside the model boundary.
- Teams need controls for memory retention, output rendering, and untrusted retrieval inputs, or prompt safety alone will miss the real risk.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK, OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST AI RMF | GOVERN — AI Governance and Accountability | Memory, retrieval, and rendering are governance issues because they expand the AI system's trust boundary. |
| Recommendation — Define accountability for memory retention, retrieval trust, and output controls in the AI governance model. | ||
| MITRE ATT&CK | TA0009;TA0010 — Collection; Exfiltration | The article describes covert collection of stored data followed by outbound transfer through browser requests. |
| Recommendation — Map covert memory-leak paths to collection and exfiltration tactics when you threat model AI systems. | ||
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Stored memory is being turned into secret leakage through generated output and browser transport. |
| Recommendation — Scan AI memory and rendered output for secret leakage and block secrets from being persisted across sessions. | ||
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | The article shows an AI system being manipulated to act on hidden instructions and leak data through delegated output. |
| Recommendation — Limit agent privileges and separate instruction sources from retrieved content to reduce identity and privilege abuse. | ||
| NIST CSF 2.0 | PR.DS-10 — Data-in-Transit is Protected | The attack depends on sensitive data leaving the environment through outbound browser requests. |
| Recommendation — Protect data in transit from AI browsers and plugins with egress controls and request inspection. | ||
Key terms
- Retrieval-augmented Generation: Retrieval-augmented generation is a pattern where an AI model pulls external information before generating output. The security challenge is that access rules can weaken when data is chunked, embedded, cached, or reused, so source permissions may not automatically follow the content into the model's context.
- Prompt Injection (Agentic): An attack where malicious instructions are embedded in content that an AI agent reads, causing the agent to execute unintended actions using its own legitimate credentials. A primary vector for agent goal hijacking and identity abuse.
- Covert Exfiltration: The hidden transfer of data through channels that appear operationally normal, such as image loads, DNS lookups, or browser fetches. In AI systems, covert exfiltration often uses generated output as the transport layer rather than attacking the model directly.
- Memory-Enabled LLM: An LLM that persists user context across sessions so it can personalise future interactions. That persistence improves usability, but it also creates a governed data store whose contents can be targeted for leakage through prompt injection or malicious retrieval content.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps security practitioners connect identity control to the broader AI and automation risk surface.
Published by the NHIMG editorial team on August 21, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org