GitHub Advisoryadvisory · PyPI
GHSA-h3ww-q6xx-w7x3 Open WebUI: LDAP and OAuth First-User Race Condition Allows Multiple Admin Accounts
HIGH
Official page ↗
- Aliases
- CVE-2026-45675
- Ecosystem
- PyPI
- Packages
- open-webui
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-269, CWE-362
- Reviewed
- 2026-05-14
Affected packages
• PyPI open-webui: < 0.9.0 → fixed in 0.9.0
Description
Summary
The LDAP and OAuth authentication flows use a TOCTOU (Time-of-Check-Time-of-Use) pattern for first-user admin role assignment. The regular signup handler (`signup_handler` in auths.py, line 663) was explicitly patched to prevent this race with the comment *"Insert with default role first to avoid TOCTOU race"*, but the LDAP and OAuth code paths were never updated with the same fix.
Vulnerable Code
LDAP (auths.py, lines 479-490)
```python
Line 482 - CHECK: is the user table empty?
role = 'admin' if not Users.has_users(db=db) else request.app.state.config.DEFAULT_USER_ROLE
Lines 484-490 - USE: create user with the role determined above
user = Auths.insert_new_auth(
email=email,
password=str(uuid.uuid4()),
name=cn,
role=role, # = 0.9.0` are not affected.
Related
Alias · CVE (1)
- CVE-2026-45675 Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. vulnerability
References
- https://github.com/open-webui/open-webui/security/advisories/GHSA-h3ww-q6xx-w7x3 web
- https://nvd.nist.gov/vuln/detail/CVE-2026-45675 advisory
- https://github.com/open-webui/open-webui/pull/23626 web
- https://github.com/open-webui/open-webui/commit/96a0b3239b1aadb23fc359bf10849c9ba12fd6ec web
- https://github.com/open-webui/open-webui package
- https://github.com/open-webui/open-webui/releases/tag/v0.9.0 web
- https://github.com/pypa/advisory-database/tree/main/vulns/open-webui/PYSEC-2026-2730.yaml web