# CVE-2026-87016: Open WebUI wildcard injection in OAuth/OIDC identity matching on SQLite

Source: https://junglewise.ai/threats/cve-2026-87016-open-webui-wildcard-injection-in-oauth-oidc-identity-matching-on  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-09. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-87016 · Severity: high · CVSS 8.1 · Published 2026-09-09

Open WebUI is a user-friendly web interface for AI models that supports external authentication via OAuth and OIDC. On SQLite deployments (the default), a flaw in how external user identities are matched allows an attacker to sign in as a different user—potentially an administrator—by injecting SQL wildcard characters into the identity claim. This can result in complete account takeover.

Technologies: [open-webui (PyPI)](https://junglewise.ai/threats/technologies/open-webui). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-87016 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-87016 being exploited in the wild.

**How severe is CVE-2026-87016?** High severity, with a CVSS score of 8.1, published 9 September 2026.

**Which products and versions are affected?** open-webui (PyPI) >= 0.6.41, < 0.11.1, ECOSYSTEM:introduced=0.6.41,fixed=0.11.1.

**Is there a fix for CVE-2026-87016?** Yes. open-webui (PyPI): upgrade to 0.11.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-87016 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-87016?** Check whether you run open-webui (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- open-webui (PyPI): upgrade to 0.11.1 or later

  ```sh
  pip install "open-webui>=0.11.1"
  ```


## Technical details

The vulnerability exists in `backend/open_webui/models/users.py` functions `get_user_by_oauth_sub` and `get_user_by_scim_external_id`, which use SQLAlchemy's generic `JSON` type with a `contains()` operator. On SQLite, this operator degrades to a `LIKE` substring comparison with wildcard wrapping (`%value%`), allowing SQL metacharacters (`%`, `_`) to function as wildcards. The intent was JSON containment testing, but the implementation emits a substring test against serialized JSON. PostgreSQL uses a separate branch with `JSONB` and equality comparison, which is correct. An attacker who controls the subject claim (via a provider that allows user-settable claims) can craft a value like `admin_sub_%` to match any admin account. Even without control, accidental matches occur when legitimate subject values contain underscores. Exploitation requires OAuth/OIDC or SCIM provisioning to be enabled (off by default). Fixed in version 0.11.1 by using SQLAlchemy's JSON subscript operator for exact matching on both databases.

## Affected products

- Open WebUI Open WebUI >= 0.6.41, < 0.11.1

## Identifiers

- CVE-2026-87016
- GHSA-wpmr-8h3q-fwj7
- PYSEC-2026-4128

## Timeline

- 2026-09-10: disclosed: GitHub Security Advisory GHSA-wpmr-8h3q-fwj7 published
- 2026-09-10: patched: Fixed in Open WebUI 0.11.1 via PR #28624

## References

- [https://api.github.com/users/Classic298](https://api.github.com/users/Classic298)
- [https://github.com/Classic298](https://github.com/Classic298)
- [https://api.github.com/users/Classic298/gists%7B/gist_id%7D](https://api.github.com/users/Classic298/gists%7B/gist_id%7D)
- [https://api.github.com/users/Classic298/repos](https://api.github.com/users/Classic298/repos)
- [https://avatars.githubusercontent.com/u/27028174?v=4](https://avatars.githubusercontent.com/u/27028174?v=4)
- [https://api.github.com/users/Classic298/events%7B/privacy%7D](https://api.github.com/users/Classic298/events%7B/privacy%7D)

## Related threats

- [Open WebUI OAuth token exchange authorization bypass](https://junglewise.ai/threats/cve-2026-88006-open-webui-oauth-token-exchange-authorization-bypass)
- [Open WebUI OAuth token exchange authorization bypass](https://junglewise.ai/threats/cve-2026-88005-open-webui-oauth-token-exchange-authorization-bypass)
- [Open WebUI infinite loop denial of service in chat history reconstruction](https://junglewise.ai/threats/cve-2026-88002-open-webui-infinite-loop-denial-of-service-in-chat-history)
- [Open WebUI server-side request forgery via unvalidated HTTP redirects](https://junglewise.ai/threats/cve-2026-88001-open-webui-server-side-request-forgery-via-unvalidated-http)
- [Open WebUI denial of service via cyclic chat tree message deletion](https://junglewise.ai/threats/cve-2026-88000-open-webui-denial-of-service-via-cyclic-chat-tree-message)
