Open WebUI Vulnerable to a Session Fixation Attack
The session cookie lacked the Secure flag and used SameSite=Lax, so it could be sent over HTTP to a cross-origin domain. An attacker could embed a malicious markdown image in a chat that, when viewed by an administrator, sent the admin's session cookie to the attacker's server, enabling account takeover.
open-webui
Originally disclosed on huntr
A vulnerability in open-webui/open-webui version 0.3.8 allows an attacker with a user-level account to perform a session fixation attack. The session cookie for all users is set with the default SameSite=Lax and does not have the Secure flag enabled, allowing the session cookie to be sent over HTTP to a cross-origin domain. An attacker can exploit this by embedding a malicious markdown image in a chat, which, when viewed by an administrator, sends the admin's session cookie to the attacker's server. This can lead to a stealthy administrator account takeover, potentially resulting in remote code execution (RCE) due to the elevated privileges of administrator accounts.
From the GitHub Advisory Database (GHSA-43g4-487m-5q6m, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the session cookie was configured without the Secure flag and with SameSite=Lax, allowing it to be sent over HTTP to a cross-origin domain.
Impact
This could lead to a stealthy administrator account takeover and potentially remote code execution due to the elevated privileges of administrator accounts.
What the attacker needed
Attacker has a user-level account; victim is an administrator; admin views the malicious chat
How it was found
- An attacker with a user-level account embeds a malicious markdown image in a chat.
- An administrator views the chat containing the image.
- The administrator's browser sends the session cookie to the attacker's server.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A session cookie is a small piece of data a website stores in your browser to remember that you are logged in. If that cookie is not marked Secure, the browser may send it over an unencrypted HTTP connection, and an attacker who can make your browser load an image from their server can receive the cookie. With the administrator's cookie, the attacker can act as the administrator without knowing the password.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.