CVE-2022-39387: Oidc authenticator XWiki OIDC Authenticator Vulnerable To Vulnerability

CRITICAL
Advisory Identifier: GHSA-m7gv-v8xx-v47w
CVSS 9.1
CWE-287
Published
Advisory Summary

CVE-2022-39387 is a CRITICAL (CVSS 9.1) xwiki oidc authenticator vulnerable to vulnerability (CWE-287: Improper Authentication) affecting Oidc authenticator libraries in the Maven ecosystem. The issue involves xwiki oidc authenticator vulnerable to bypassing openid login by providing a custom provider. Remediation is available by upgrading affected packages to version 1.29.1.

CVE-2022-39387 at a Glance

CVE Identifier CVE-2022-39387
GHSA Identifier GHSA-m7gv-v8xx-v47w
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-287: Improper Authentication
Affected Product Oidc authenticator
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2022-39387

To remediate this vulnerability, upgrade all affected Oidc authenticator dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.xwiki.contrib.oidc:oidc-authenticator fixed: 1.29.1
<dependency>
    <groupId>org.xwiki.contrib.oidc</groupId>
    <artifactId>oidc-authenticator</artifactId>
    <version>1.29.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.xwiki.contrib.oidc

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2022-39387, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.xwiki.contrib.oidc

Analyze the terminal output to locate any version of Oidc authenticator in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.29.1), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.xwiki.contrib.oidc command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Oidc authenticator, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Even if a wiki has an OpenID provider configured through its xwiki.properties, it is possible to provide a third party provider by providing 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 ### Patches Patched in version 1.29.1. ### Workarounds There is no workaround, an upgrade of the authenticator is required. ### References https://jira.xwiki.org/browse/OIDC-118 ### For more information If you have any questions or comments about this advisory: * Open an issue in Jira XWiki * Email us at our security mailing list

CVE-2022-39387 Affected Oidc authenticator Versions

1 component(s)
Fixed Versions:
1.29.1
Product / Package Ecosystem Affected Versions Fixed Version
org.xwiki.contrib.oidc:oidc-authenticator
Maven
< 1.29.1
1.29.1

References

Frequently Asked Questions

What is CVE-2022-39387?
CVE-2022-39387 is a security vulnerability in Oidc authenticator involving XWiki OIDC Authenticator vulnerable to bypassing OpenID login by providing a custom provider under CWE-287: Improper Authentication.
Which Oidc authenticator versions are affected?
Affected versions include releases prior to 1.29.1 across affected packages: org.xwiki.contrib.oidc:oidc-authenticator.
What version fixes CVE-2022-39387?
Upgrading to 1.29.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is oidc-authenticator affected?
Yes, org.xwiki.contrib.oidc:oidc-authenticator is affected in releases prior to 1.29.1. Upgrade your dependency to 1.29.1 or later.
What is the CVSS score of CVE-2022-39387?
CVE-2022-39387 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H.
What CWE is associated with CVE-2022-39387?
CVE-2022-39387 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check Maven dependencies for CVE-2022-39387?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.xwiki.contrib.oidc'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m7gv-v8xx-v47w",
  "modified" : "2022-11-08T15:17:36Z",
  "published" : "2022-11-04T18:58:46Z",
  "aliases" : [ "CVE-2022-39387" ],
  "summary" : "XWiki OIDC Authenticator vulnerable to bypassing OpenID login by providing a custom provider",
  "details" : "### Impact\n\nEven if a wiki has an OpenID provider configured through its xwiki.properties, it is possible to provide a third party provider by providing 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.\n\nWith 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\n\n### Patches\n\nPatched in version 1.29.1.\n\n### Workarounds\n\nThere is no workaround, an upgrade of the authenticator is required.\n\n### References\n\nhttps://jira.xwiki.org/browse/OIDC-118\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in Jira XWiki\n* Email us at our security mailing list\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.contrib.oidc:oidc-authenticator"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.29.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xwiki-contrib/oidc/security/advisories/GHSA-m7gv-v8xx-v47w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39387"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki-contrib/oidc/commit/0247af1417925b9734ab106ad7cd934ee870ac89"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xwiki-contrib/oidc"
  }, {
    "type" : "WEB",
    "url" : "https://jira.xwiki.org/browse/OIDC-118"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-04T18:58:46Z",
    "nvd_published_at" : "2022-11-04T19:15:00Z"
  }
}