CVE-2022-39387 XWiki OIDC Authenticator vulnerable to OpenID login bypass due to improper authentication
Attackers can bypass authentication and gain admin privileges by specifying malicious OpenID provider parameters in requests.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-39387?
CVE-2022-39387 is a critical authentication bypass vulnerability in xwiki-contrib oidc, published on 4 Nov 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
XWiki OIDC has various tools to manipulate OpenID Connect protocol in XWiki. Prior to version 1.29.1, even if a wiki has an OpenID provider configured through its xwiki.properties, it is possible to provide a third party provider its details through request parameters. One can then bypass the XWiki authentication altogether by specifying its own provider through the oidc.endpoint.* request parameters (or by using an XWiki-based OpenID provider with oidc.xwikiprovider. With the same approach, one could also provide a specific group mapping through oidc.groups.mapping that would make his user automatically part of the XWikiAdminGroup. This issue has been patched, please upgrade to 1.29.1. There is no workaround, an upgrade of the authenticator is required.
Weakness: CWE-287
Which versions are affected by CVE-2022-39387?
2 open source packages ship an affected version, including org.xwiki.contrib.oidc:oidc-authenticator. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.xwiki.contrib.oidc:oidc-authenticator Maven | All versions | 1.29.1 |
org.xwiki.contrib.oidc:oidc-authenticator Maven | All versions | 1.29.1 |
Products include Xwiki Openid Connect.
How do I fix CVE-2022-39387?
Upgrade org.xwiki.contrib.oidc:oidc-authenticator to 1.29.1 or later.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2022-39387 being exploited?
There is no known exploitation of CVE-2022-39387 in the wild and no public exploit code.
Sources
Also known as GHSA-m7gv-v8xx-v47w.