Junglewise Threat Intelligence

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

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

Executive brief

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.

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

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

Related threats