Open WebUI Flaw Enables Remote Code Execution

Today, we’re joined by Dominic Jainy, an IT professional whose work sits at the intersection of AI and security. He’s here to break down a high-severity vulnerability in Open WebUI, a popular enterprise AI interface. We’ll explore how a feature designed for convenience became a backdoor, allowing attackers to hijack AI workloads, steal sensitive data, and even execute code directly on company servers.

The report on CVE-2025-64496 describes a social engineering pretext like a “free GPT-4 alternative.” Can you walk us through the technical attack chain, from a user connecting to a malicious server to how server-sent events (SSE) are exploited to inject code?

It’s a classic case of exploiting user trust. The attack begins with social engineering, like an offer for a “free GPT-4 alternative.” An employee enables the Direct Connections feature—which is disabled by default—and connects to the attacker’s malicious server. Once that connection is made, the attacker’s server streams server-sent events (SSE) back to the Open WebUI frontend. The platform’s SSE handler has a critical flaw: it implicitly trusts these incoming events, especially one type tagged as “execute,” and runs its payload. The attacker sends malicious JavaScript, and the system executes it right in the user’s browser.

The injected code targets JSON Web Tokens in localStorage. Given these tokens are long-lived and lack HttpOnly protection, could you elaborate on how this specific oversight allows for persistent account takeover and grants access to a user’s chats, documents, and API keys?

This is where the poor session management becomes so damaging. Open WebUI stores the user’s JSON Web Token in the browser’s localStorage, making it accessible to any script on the page. These tokens are long-lived by default and crucially lack the HttpOnly flag, which would have prevented scripts from reading them. It’s a perfect storm for theft. Because the token is also valid across browser tabs, once an attacker has it, they have persistent access. They can effectively become the user, gaining control over their AI workspace, reading private chats and documents, and stealing any API keys stored within that environment.

This vulnerability can escalate from browser-level access to full remote code execution. What is the role of the workspace.tools permission in this escalation, and how does an attacker use a stolen session token to execute unsandboxed Python code on the backend server?

The nightmare escalates from there. If the compromised account has the workspace.tools permission, the attacker can pivot from the browser to a full server compromise. Using the stolen session token for authentication, they send malicious Python code to Open WebUI’s Tools API. The most frightening part is that this code is executed without any sandboxing or validation. It runs with full privileges on the backend server. At that point, an attacker can install persistence mechanisms, pivot into internal networks, or launch lateral attacks. This is why the flaw received a high severity score of 8/10 from NVD; it turns a user’s click into a potential enterprise breach.

The patch in v0.6.35 blocks “execute” SSE events from Direct Connections. Beyond patching, researchers recommend moving to HttpOnly cookies and using a strict CSP. How crucial are these additional architectural changes for preventing similar injection attacks in the future?

The immediate patch in v0.6.35 is a necessary first step; it blocks those dangerous “execute” SSE events from Direct Connections. But relying on this patch alone is shortsighted. The researchers’ additional recommendations are crucial for a resilient architecture. Moving authentication tokens into HttpOnly cookies is fundamental—it would have stopped this token theft. Making tokens short-lived with rotation policies further limits an attacker’s window of opportunity. Finally, a strict Content Security Policy (CSP) that bans dynamic code evaluation provides another powerful layer of defense against future injection attacks. It’s about moving from a reactive patch to a proactive, secure-by-design posture.

Do you have any advice for our readers?

My advice is to treat convenience with a healthy dose of skepticism, especially in enterprise environments. Features like Direct Connections expand the attack surface, and it’s vital to educate users on social engineering—a “free” tool is rarely ever free. From a technical standpoint, this is a stark reminder to practice defense-in-depth. Don’t rely on defaults. Enforce the principle of least privilege, use robust session management with HttpOnly cookies, and implement a strict CSP. A single layer of security is never enough, especially as AI becomes more integrated into business operations.

Explore more

Agentic AI Redefines the Software Development Lifecycle

The quiet hum of servers executing tasks once performed by entire teams of developers now underpins the modern software engineering landscape, signaling a fundamental and irreversible shift in how digital products are conceived and built. The emergence of Agentic AI Workflows represents a significant advancement in the software development sector, moving far beyond the simple code-completion tools of the past.

Is AI Creating a Hidden DevOps Crisis?

The sophisticated artificial intelligence that powers real-time recommendations and autonomous systems is placing an unprecedented strain on the very DevOps foundations built to support it, revealing a silent but escalating crisis. As organizations race to deploy increasingly complex AI and machine learning models, they are discovering that the conventional, component-focused practices that served them well in the past are fundamentally

Agentic AI in Banking – Review

The vast majority of a bank’s operational costs are hidden within complex, multi-step workflows that have long resisted traditional automation efforts, a challenge now being met by a new generation of intelligent systems. Agentic and multiagent Artificial Intelligence represent a significant advancement in the banking sector, poised to fundamentally reshape operations. This review will explore the evolution of this technology,

Cooling Job Market Requires a New Talent Strategy

The once-frenzied rhythm of the American job market has slowed to a quiet, steady hum, signaling a profound and lasting transformation that demands an entirely new approach to organizational leadership and talent management. For human resources leaders accustomed to the high-stakes war for talent, the current landscape presents a different, more subtle challenge. The cooldown is not a momentary pause

What If You Hired for Potential, Not Pedigree?

In an increasingly dynamic business landscape, the long-standing practice of using traditional credentials like university degrees and linear career histories as primary hiring benchmarks is proving to be a fundamentally flawed predictor of job success. A more powerful and predictive model is rapidly gaining momentum, one that shifts the focus from a candidate’s past pedigree to their present capabilities and