# 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.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 Nov 2022
- **Updated:** 23 Apr 2025
- **Also known as:** GHSA-m7gv-v8xx-v47w

## 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 (Improper Authentication)

## 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 | Ecosystem | 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: Xwiki Openid Connect.

## How do I fix CVE-2022-39387?

Upgrade org.xwiki.contrib.oidc:oidc-authenticator to 1.29.1 or later.

## Is CVE-2022-39387 being exploited?

There is no known exploitation of CVE-2022-39387 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-39387 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2022-39387 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.xwiki.contrib.oidc:oidc-authenticator (Maven): affected all versions; fixed in 1.29.1
- org.xwiki.contrib.oidc:oidc-authenticator (Maven): affected all versions; fixed in 1.29.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-39387/ (Markdown: https://insights.sbomify.com/CVE-2022-39387/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-39387
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-39387
- OSV: https://osv.dev/vulnerability/CVE-2022-39387

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-39387/
Summaries are generated and may contain mistakes; the official description above is the record.
