<?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>Open WebUI (Formerly Ollama WebUI) 0.1.105 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/open-webui-formerly-ollama-webui-0.1.105/</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>Wed, 03 Jul 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/open-webui-formerly-ollama-webui-0.1.105/feed.xml" rel="self" type="application/rss+xml"/><item><title>Open WebUI Improper Authorization Control Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-07-open-webui-auth-bypass/</link><pubDate>Wed, 03 Jul 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-07-open-webui-auth-bypass/</guid><description>Open WebUI version 0.1.105 is vulnerable to an improper authorization control issue, where user accounts with a `pending` status can bypass authorization checks and make authenticated API calls as a `user` context due to the application failing to properly validate the user's role beyond JWT validation.</description><content:encoded><![CDATA[<p>Open WebUI, formerly Ollama WebUI, version 0.1.105, suffers from an improper authorization control vulnerability. This flaw allows users with a &lsquo;pending&rsquo; status to bypass intended restrictions and make authenticated API calls as if they were authorized &lsquo;user&rsquo; roles. The vulnerability arises because the application&rsquo;s API endpoints do not adequately validate the user&rsquo;s role, relying solely on the presence of a valid JWT for authentication, while neglecting to verify the user&rsquo;s assigned role. The vulnerability was discovered by Taylor Pennington of KoreLogic, Inc. This issue allows unapproved users to access sensitive data and functionality.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker registers a new user account on the Open WebUI platform with <code>new sign-ups</code> enabled. The new account is automatically assigned a <code>pending</code> status.</li>
<li>The application generates a JWT for the new user, despite their <code>pending</code> status, and returns it to the attacker.</li>
<li>The attacker crafts an HTTP GET request to the <code>/ollama/api/tags</code> endpoint, including the JWT in the <code>Authorization</code> header.</li>
<li>The Open WebUI server receives the request and validates the JWT using the <code>get_current_user</code> function.</li>
<li>The <code>get_current_user</code> function only checks the validity of the JWT but does not verify the user&rsquo;s role, thus allowing the request to proceed.</li>
<li>The server retrieves a list of available models without properly validating the user&rsquo;s authorization.</li>
<li>The server returns the list of available models in the HTTP response to the attacker.</li>
<li>The attacker can now access other regular user accessible endpoints.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows unauthorized users to access sensitive information such as available models and potentially other resources intended only for authorized users. This could lead to information disclosure, unauthorized use of resources, and further compromise of the system. This issue affects Open WebUI installations that have enabled new user sign-ups without properly verifying user roles, potentially impacting all users on the platform.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule &ldquo;Detect Open WebUI API Access by Pending User&rdquo; to your SIEM to identify unauthorized API access attempts from users with a <code>pending</code> role based on HTTP request headers and response codes.</li>
<li>Apply the patch recommended by Open WebUI to utilize the <code>get_verified_user()</code> function instead of <code>get_current_user()</code> in all authenticated endpoints to enforce proper authorization checks as described in the Mitigation Recommendation section.</li>
<li>Monitor user registration requests to <code>/api/v1/auths/signup</code> using the &ldquo;Detect Open WebUI User Registration&rdquo; Sigma rule to track account creation attempts and potential abuse.</li>
<li>Investigate and revoke any JWTs associated with <code>pending</code> user accounts to prevent unauthorized access using the email IOC.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>authorization</category><category>web-application</category><category>vulnerability</category></item></channel></rss>