Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-15603

CVE-2025-15603: Open-WebUI JWT Key Handler RCE Vulnerability

CVE-2025-15603 is a remote code execution vulnerability in open-webui up to version 0.6.16 affecting the JWT Key Handler. The flaw involves insufficiently random WEBUI_SECRET_KEY values that attackers can exploit remotely.

Published:

CVE-2025-15603 Overview

A cryptographic vulnerability has been identified in Open WebUI versions up to 0.6.16. The vulnerability affects the JWT Key Handler component within the backend/start_windows.bat file. Manipulation of the WEBUI_SECRET_KEY argument leads to insufficiently random values being generated for JWT tokens, potentially compromising the security of authentication mechanisms.

Critical Impact

Weak random value generation for JWT secret keys could allow attackers to predict or brute-force authentication tokens, potentially leading to unauthorized access to Open WebUI instances.

Affected Products

  • Open WebUI versions up to and including 0.6.16
  • Windows deployments using backend/start_windows.bat
  • Installations with default or weak WEBUI_SECRET_KEY configurations

Discovery Timeline

  • 2026-03-09 - CVE-2025-15603 published to NVD
  • 2026-03-11 - Last updated in NVD database

Technical Details for CVE-2025-15603

Vulnerability Analysis

This vulnerability falls under CWE-310 (Cryptographic Issues), specifically relating to insecure random number generation for cryptographic purposes. The JWT Key Handler in Open WebUI's Windows startup script fails to generate sufficiently random values for the WEBUI_SECRET_KEY parameter. JWT (JSON Web Token) security fundamentally depends on the unpredictability of the secret key used to sign tokens. When this key is derived from insufficient entropy sources, the cryptographic assurances of JWT authentication are significantly weakened.

The attack requires network access and involves high complexity, meaning exploitation requires specific conditions to be met. The vulnerability has been publicly disclosed through the Huntr Bounty Report, and while exploitation is difficult, the public disclosure increases the risk profile.

Root Cause

The root cause stems from improper implementation of random value generation within the Windows batch script responsible for initializing Open WebUI. The start_windows.bat script likely uses predictable or low-entropy sources when generating or setting the WEBUI_SECRET_KEY environment variable. This could involve:

  • Using predictable seed values for random number generation
  • Relying on system time or other guessable inputs as entropy sources
  • Defaulting to static or easily reproducible values when dynamic generation fails

Attack Vector

The attack vector is network-based, allowing remote exploitation without requiring prior authentication or user interaction. However, the high attack complexity indicates that successful exploitation requires:

  1. Knowledge of how the weak random values are generated
  2. Ability to predict or reconstruct the JWT secret key
  3. Network access to the target Open WebUI instance

Once an attacker determines the weak secret key, they could forge valid JWT tokens to impersonate legitimate users, potentially gaining unauthorized access to the application and its data.

The vulnerability mechanism involves the Windows batch script's handling of the WEBUI_SECRET_KEY argument. When insufficient randomness is used in key generation, attackers can potentially predict the generated values by analyzing the entropy sources or through brute-force attacks against a reduced key space. For detailed technical analysis, refer to the Huntr Bounty Report.

Detection Methods for CVE-2025-15603

Indicators of Compromise

  • Unusual JWT token validation patterns or authentication anomalies
  • Multiple successful authentication attempts from different IP addresses using similar token signatures
  • Log entries indicating JWT tokens with unexpected or predictable patterns
  • Authentication events that bypass normal session management workflows

Detection Strategies

  • Monitor authentication logs for anomalous JWT token usage patterns
  • Implement JWT token analysis to detect tokens signed with weak or predictable keys
  • Deploy intrusion detection rules to flag repeated authentication attempts with similar token structures
  • Review Windows batch script execution logs for start_windows.bat invocations

Monitoring Recommendations

  • Enable verbose logging for JWT token generation and validation events
  • Set up alerts for authentication anomalies in Open WebUI instances
  • Monitor network traffic for suspicious API authentication patterns
  • Regularly audit WEBUI_SECRET_KEY configuration values for entropy quality

How to Mitigate CVE-2025-15603

Immediate Actions Required

  • Manually set a strong, cryptographically secure WEBUI_SECRET_KEY value with at least 256 bits of entropy
  • Regenerate all existing JWT tokens after updating the secret key
  • Rotate the secret key and invalidate all active sessions
  • Upgrade Open WebUI to a version beyond 0.6.16 when a patched version becomes available

Patch Information

Users should monitor the Open WebUI project for security updates addressing this vulnerability. Additional details are available through VulDB #349701 and the associated Huntr Bounty Report. Until an official patch is released, implement the workarounds below to mitigate risk.

Workarounds

  • Replace the automatically generated WEBUI_SECRET_KEY with a manually generated cryptographically secure random value
  • Use a cryptographically secure random number generator (e.g., openssl rand -hex 32) to create the secret key
  • Consider deploying Open WebUI using Linux-based systems where the startup script may handle entropy differently
  • Implement additional authentication layers such as MFA to reduce the impact of potential token forgery
bash
# Generate a cryptographically secure secret key
# Use this value to set WEBUI_SECRET_KEY in your environment
openssl rand -hex 32

# Set the environment variable before starting Open WebUI
set WEBUI_SECRET_KEY=<your-generated-secure-key>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.