<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Rag — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/rag/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 18 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/rag/feed.xml" rel="self" type="application/rss+xml"/><item><title>Open WebUI Knowledge Base Destruction and RAG Poisoning via Unauthorized Collection Overwrite</title><link>https://feed.craftedsignal.io/briefs/2024-01-18-open-webui-rag-poisoning/</link><pubDate>Thu, 18 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-18-open-webui-rag-poisoning/</guid><description>Open WebUI is vulnerable to knowledge base destruction and RAG poisoning due to a lack of authorization checks on the `/api/v1/retrieval/process/web` endpoint, allowing an attacker to overwrite a victim's knowledge base with attacker-controlled content.</description><content:encoded><![CDATA[<p>Open WebUI, a retrieval-augmented generation (RAG) application, is susceptible to unauthorized knowledge base modification. The vulnerability lies in the <code>process_web</code> endpoint within <code>backend/open_webui/routers/retrieval.py</code>. Specifically, the <code>POST /api/v1/retrieval/process/web</code> endpoint lacks authorization checks, which allows any authenticated user with knowledge of a target knowledge base UUID to overwrite it with arbitrary content. This is possible due to the <code>overwrite</code> parameter, which defaults to <code>True</code> and triggers the deletion of the existing vector collection before new content is written via the <code>save_docs_to_vector_db</code> function. The issue affects the current main branch (commit <code>6fdd19bf1</code>) and likely all versions with RAG functionality. An attacker can leverage this vulnerability to poison the RAG system by injecting malicious content into the knowledge base.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains a valid user account on the Open WebUI instance.</li>
<li>Attacker discovers the victim&rsquo;s knowledge base UUID, potentially through the <code>knowledge-bases</code> meta-collection (as mentioned in the report).</li>
<li>Attacker crafts a POST request to the <code>/api/v1/retrieval/process/web</code> endpoint, setting the <code>collection_name</code> parameter to the victim&rsquo;s KB UUID and ensures <code>overwrite=true</code>.</li>
<li>The POST request includes a <code>url</code> parameter pointing to an attacker-controlled URL containing malicious content.</li>
<li>The Open WebUI server fetches the content from the attacker-controlled URL.</li>
<li>The <code>save_docs_to_vector_db</code> function is called, which first deletes the existing vector collection associated with the victim&rsquo;s knowledge base.</li>
<li>The fetched content from the attacker&rsquo;s URL is then embedded and stored as the new content for the knowledge base.</li>
<li>When the victim queries their knowledge base, the RAG system returns the attacker-controlled content, leading to potential misinformation or malicious actions.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation leads to data destruction, where the victim&rsquo;s original knowledge base embeddings are permanently deleted from the vector store. Furthermore, the RAG system is poisoned with attacker-controlled content, causing the LLM to return misleading or malicious responses. This can enable indirect prompt injection and manipulation of the victim&rsquo;s LLM behavior. The poisoned content persists until the knowledge base is rebuilt from the original source files, creating a persistent vulnerability. Versions of open-webui up to and including 0.8.12 are affected.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply authorization checks to the <code>/api/v1/retrieval/process/web</code> endpoint to verify that the user has write access to the target collection, mitigating CVE-2026-44554.</li>
<li>Monitor webserver logs for POST requests to <code>/api/v1/retrieval/process/web</code> with suspicious <code>collection_name</code> parameters, using the Sigma rule &ldquo;Detect Open WebUI Unauthorized Collection Overwrite Attempt&rdquo; to identify potential exploitation attempts.</li>
<li>Inspect network traffic for connections to suspicious URLs used in the <code>url</code> parameter of the <code>/api/v1/retrieval/process/web</code> endpoint, such as the IOC <code>https://attacker.com/poison</code>.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>rag</category><category>poisoning</category><category>web-application</category></item></channel></rss>