By NHI Mgmt Group Editorial TeamDomain: AI SecuritySource: ActiveFencePublished March 20, 2026

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: This is an analysis of how RAG-enabled LLM memory can be abused to exfiltrate secrets through prompt injection and covert browser requests.

Why it matters: It matters because IAM, PAM, and NHI teams increasingly have to govern AI systems that retain sensitive context, call external tools, and expose data through identity-adjacent control paths.

By the numbers:

  • Only 44% of organisations are currently using a dedicated secrets management system.
  • 80% of organisations report their AI agents have already performed actions beyond their intended scope, including accessing unauthorised systems, sharing sensitive data, and revealing access credentials.
  • 92% agree governing AI agents is critical to enterprise security, yet only 44% have implemented any policies to do so.

👉 Read ActiveFence's analysis of LLM memory exfiltration through RAG


Context

RAG-enabled LLMs blur the line between a model answering a question and a system that persists sensitive context across sessions. Once memory becomes part of the user experience, the security problem shifts from prompt quality to data governance, because stored names, project details, and business context can be exposed through indirect channels rather than direct account compromise.

The article shows a genuine identity and secrets-management intersection. The memory store, external RAG sources, browser rendering, and tool integrations all behave like access paths that must be governed, audited, and constrained. That is a familiar pattern to IAM and NHI teams even when the system is AI-driven: sensitive data moves through identities, permissions, and execution boundaries, not just through the model itself.


Key questions

Q: How should security teams prevent LLM memory from leaking sensitive data?

A: Limit what the model is allowed to remember, separate low-risk personalization from regulated or secret material, and assume every retained field can become an attack target. Pair memory limits with strong logging, output filtering, and explicit controls over which retrieval sources may influence model responses.

Q: Why do RAG systems increase data exfiltration risk?

A: RAG systems expand the trust boundary because the model can pull in external content, then transform that content into output or tool actions. If an attacker can influence the retrieved source, they can steer the model toward leaking memory, exposing confidential context, or generating unintended outbound requests.

Q: What breaks when browser-rendered LLM output is not controlled?

A: Generated HTML, especially image tags and links, can create automatic outbound requests that carry secrets to attacker-controlled infrastructure. Without strict validation and rendering controls, the browser becomes a covert exfiltration channel even when the model itself never directly sends the data.

Q: Who is accountable when an AI assistant overshares sensitive content?

A: Accountability sits with the team that owns the policy, the attribute feeds, and the enforcement points, because ABAC only works when all three are managed together. If any one of them is missing, the organisation has not built a defensible control path, even if the model itself appears constrained.


Technical breakdown

How prompt injection turns memory into an exfiltration path

Prompt injection manipulates the model into following attacker instructions instead of user intent. In a memory-enabled LLM, the attack becomes more serious because the model can be persuaded to retrieve stored context and place it into content that the browser renders. If that output includes image tags, the browser generates outbound requests automatically. The model is not directly stealing data; it is being used to construct a delivery mechanism that leaks data through normal client behaviour.

Practical implication: Treat memory-enabled prompts and rendered output as separate trust boundaries, and block untrusted instructions from influencing retrieval or browser output.

Why URL safeness checks and domain parsing are not enough

A URL safeness check only helps if it correctly recognises the malicious destination. The article shows two weak points: attackers can register fresh domains that evade reputation-based filters, and parsing mistakes around double TLDs can allow hidden subdomains to pass validation. That means the security control is not just URL filtering, but canonicalisation, policy enforcement, and context-aware inspection of every destination the model can generate or reference.

Practical implication: Validate generated URLs after canonicalisation and enforce allowlists for outbound destinations, not only reputation-based checks.

External RAG sources expand the attack surface beyond the model

When an LLM reads browser content, cloud files, or other third-party sources, it inherits the risk of indirect prompt injection. Hidden instructions inside HTML or file metadata can be treated as model inputs even when they were never intended as prompts. That creates a supply-chain style problem for AI systems: the model, its retrieval layer, and the content source all need integrity controls. In governance terms, this is where AI security starts to overlap with identity and access management because delegated data access becomes a form of privilege.

Practical implication: Control which sources the model can retrieve from, strip executable instructions from retrieved content, and audit delegated access paths like any other privileged workflow.


Threat narrative

Attacker objective: The attacker wants to extract sensitive memory content from the LLM without breaching the provider or stealing the user's account directly.

  1. Entry begins with prompt injection embedded in content the LLM retrieves or renders, including malicious HTML, image URLs, or file metadata from external RAG sources.
  2. Credential access occurs when the model is induced to expose stored memory contents such as names, project details, or other sensitive context through generated output.
  3. Escalation follows when the browser automatically requests attacker-controlled URLs, converting the model's response into a covert exfiltration channel that bypasses ordinary review.
  4. Impact is the loss of confidential personal or corporate data, with the attacker reconstructing secrets from DNS or HTTP logs and using them for further abuse.

NHI Mgmt Group analysis

Stateful AI creates a new secrets-governance problem, not just a prompt-safety problem. Once an LLM stores user context across sessions, it begins to resemble a privileged system that can recall and expose sensitive information. That changes the control model from one-time input filtering to ongoing protection of memory, retrieval, rendering, and delegated access paths. Practitioners should treat RAG memory as governed data, not convenience metadata.

AI memory exfiltration is a named control gap: covert retrieval plus browser rendering. The article demonstrates that the weakest point is often the boundary between model output and client execution, where a harmless-looking image tag becomes a data channel. This is the kind of failure that traditional IAM does not see because the abuse happens after authentication, yet it still depends on identity-adjacent controls over access, scope, and destination. The practitioner conclusion is that output handling must be governed as tightly as input authentication.

Double-TLD parsing mistakes show how policy can fail at the edge of identity and data flow. When the security check misclassifies a domain structure, the attacker gains a low-cost way to hide exfiltration destinations inside ordinary-looking URLs. That is not just a web bug; it is a governance failure because the system accepted an untrusted destination as legitimate. Teams should assume that AI-generated destinations require the same scrutiny as privileged API calls.

RAG supply chains need the same integrity thinking as NHI and service-account governance. External sources, plugins, and file metadata are effectively delegated authorities for the model, and delegated authority without lifecycle control becomes an exfiltration path. This is where AI security meets identity security in a practical way: the more the system can retrieve and act, the more it needs scope limits, logging, and revocation. Practitioners should align AI retrieval with least privilege and explicit trust boundaries.

Named concept: memory exfiltration through rendered output. This pattern matters because the leak does not rely on direct compromise of the model or the user account. Instead, it exploits the combination of retained memory, attacker-controlled content, and automatic browser requests. For security programmes, that means the control objective is not just blocking prompt injection but preventing any generated output from becoming an unauthorized data channel.

What this signals

The operational signal for practitioners is that LLM security is becoming an identity problem as much as a model problem. When retrieval, memory, and rendering can all move data, security teams need a governed trust chain that includes content sources, outbound destinations, and revocation paths. The most useful control question is no longer whether the model is safe in isolation, but whether its delegated access can be constrained at runtime.

Memory-bound exfiltration: this is the control pattern teams should now name internally. Once an AI system can persist context, retrieve external content, and render active output, the boundary between data handling and access control disappears. That makes least privilege, source integrity, and output inspection part of the same programme, not separate disciplines. For teams already using the OWASP Agentic AI Top 10, this is a concrete example of why tool and memory governance must be tested together.

Security programmes should also expect more compliance scrutiny where personal data can be recalled from memory or exposed through third-party integrations. The question for governance boards is whether the organisation can prove what data the system remembered, what it retrieved, and where that data went next. That audit trail will matter as much as the model prompt in any investigation.


For practitioners

  • Constrain AI memory to explicit trust scopes Separate benign personalization from sensitive business context, and prevent long-lived memory from storing secrets, credentials, or regulated data unless a clear business need exists. Review which fields can persist across sessions and apply retention limits to the memory store.
  • Inspect generated URLs after canonicalisation Apply outbound URL validation after normalising domains, subdomains, and TLD structures so double-TLD tricks and encoded destinations cannot bypass controls. Block model-generated destinations that are not on a strict allowlist.
  • Strip executable instructions from retrieved content Treat browser pages, documents, and file metadata as untrusted inputs before they reach the model. Remove hidden prompts, limit HTML features, and prevent retrieval sources from influencing tool use or output formatting.
  • Audit retrieval and rendering paths as privileged workflows Log which sources the model retrieved, what content influenced the answer, and which outbound requests the client generated. Use the same governance mindset you would for privileged access because the delegation chain can expose sensitive data at runtime.

Key takeaways

  • LLM memory can become an exfiltration path when prompt injection influences retrieval and browser output.
  • The article's core risk is a governance gap across memory scope, URL validation, and third-party source trust.
  • Teams should treat AI retrieval and rendering as privileged workflows that need explicit policy, logging, and revocation controls.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and MITRE ATLAS address the attack surface, NIST AI RMF and NIST CSF 2.0 set the technical controls, and GDPR define the regulatory obligations.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10The article covers prompt injection, tool misuse, and memory abuse in agentic systems.
NIST AI RMFMANAGEAI RMF management is relevant because the issue is operational control of AI memory and outputs.
NIST CSF 2.0PR.AC-4Least privilege and access governance apply to retrieval sources and delegated AI data access.
GDPRArt.32Personal data leakage through memory and retrieval triggers security and confidentiality obligations.
MITRE ATLASTA0001 Initial Access; TA0009 Collection; TA0010 ExfiltrationThe article describes adversarial manipulation leading to data collection and exfiltration.

Map memory and retrieval controls to agentic AI risks, then test prompt injection and output paths continuously.


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.
  • Memory Exfiltration: The theft of data stored in an AI system's retained context, such as user preferences, project details, or sensitive business facts. It becomes especially dangerous when the model can be induced to place that data into output that a browser, plugin, or tool then transmits outward.
  • Indirect Prompt Injection: Indirect prompt injection is an attack where malicious instructions are hidden inside content that an AI system reads later. The model may treat that content as context rather than as hostile input, which can influence tool use, data access, or workflow actions if controls are weak.

What's in the full article

ActiveFence's full blog covers the operational detail this post intentionally leaves for the source:

  • Proof-of-concept examples for multi-domain and double-TLD exfiltration patterns
  • Browser and URL handling details that show where safelists and scanners can be bypassed
  • Specific defensive considerations for RAG sources, file metadata, and HTML rendering
  • Red-team testing approaches for identifying covert memory leaks in AI workflows

👉 The full ActiveFence post covers the attack mechanics, bypass patterns, and red-team proof of concept details.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, secrets management, and workload identity in practical operational terms. It helps security practitioners build the control discipline needed when AI systems start retaining and moving sensitive data.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 21, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org