CVE-2023-45144: Identity oauth ui Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-h2rm-29ch-wfmh
CVSS 10.0
CWE-79
Published
Advisory Summary

CVE-2023-45144 is a CRITICAL (CVSS 10.0) remote code execution vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Identity oauth ui libraries in the Maven ecosystem. The issue involves xwiki identity oauth privilege escalation (pr)/remote code execution from login screen through unescaped url parameter. Remediation is available by upgrading affected packages to version 1.6.

CVE-2023-45144 at a Glance

CVE Identifier CVE-2023-45144
GHSA Identifier GHSA-h2rm-29ch-wfmh
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Identity oauth ui
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 10.0

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:C/C:H/I:H/A:H).

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

How to Fix CVE-2023-45144

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

com.xwiki.identity-oauth:identity-oauth-ui fixed: 1.6
<dependency>
    <groupId>com.xwiki.identity-oauth</groupId>
    <artifactId>identity-oauth-ui</artifactId>
    <version>1.6</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=com.xwiki.identity-oauth

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=com.xwiki.identity-oauth

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

Note: The mvn dependency:tree -Dincludes=com.xwiki.identity-oauth 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Identity oauth ui, 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 When login via the OAuth method, the identityOAuth parameters, sent in a GET request is vulnerable to XSS and XWiki syntax injection. This allows remote code execution via the groovy macro and thus affects the confidentiality, integrity and availability of the whole XWiki installation. The vulnerability is in [this part](https://github.com/xwikisas/identity-oauth/blob/master/ui/src/main/resources/IdentityOAuth/LoginUIExtension.vm#L58) of the code. ### Patches The issue has been fixed in Identity OAuth version 1.6 by https://github.com/xwikisas/identity-oauth/commit/d805d3154b17c6bf455ddf5deb0a3461a3833bc6 . The fix is in the content of the [IdentityOAuth/LoginUIExtension](https://github.com/xwikisas/identity-oauth/commit/d805d3154b17c6bf455ddf5deb0a3461a3833bc6#diff-2ab2e0716443d790d7d798320e4a45151661f4eca5440331f4a227b29c87c188) file ### Workarounds There are no known workarounds besides upgrading. ### References _Are there any links users can visit to find out more?_ * Original report: https://jira.xwiki.org/browse/XWIKI-20719

CVE-2023-45144 Affected Identity oauth ui Versions

1 component(s)
Fixed Versions:
1.6
Product / Package Ecosystem Affected Versions Fixed Version
com.xwiki.identity-oauth:identity-oauth-ui
Maven
≥ 1.0
< 1.6
1.6

References

Frequently Asked Questions

What is CVE-2023-45144?
CVE-2023-45144 is a security vulnerability in Identity oauth ui involving XWiki Identity Oauth Privilege escalation (PR)/remote code execution from login screen through unescaped URL parameter under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Identity oauth ui versions are affected?
Affected versions include releases prior to 1.6 across affected packages: com.xwiki.identity-oauth:identity-oauth-ui.
What version fixes CVE-2023-45144?
Upgrading to 1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is identity-oauth-ui affected?
Yes, com.xwiki.identity-oauth:identity-oauth-ui is affected in releases prior to 1.6. Upgrade your dependency to 1.6 or later.
What is the CVSS score of CVE-2023-45144?
CVE-2023-45144 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2023-45144?
CVE-2023-45144 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Maven dependencies for CVE-2023-45144?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.xwiki.identity-oauth'. 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-h2rm-29ch-wfmh",
  "modified" : "2023-10-17T12:51:01Z",
  "published" : "2023-10-17T12:51:01Z",
  "aliases" : [ "CVE-2023-45144" ],
  "summary" : "XWiki Identity Oauth Privilege escalation (PR)/remote code execution from login screen through unescaped URL parameter",
  "details" : "### Impact\n\nWhen login via the OAuth method, the identityOAuth parameters, sent in a GET request is vulnerable to XSS and XWiki syntax injection. This allows remote code execution via the groovy macro and thus affects the confidentiality, integrity and availability of the whole XWiki installation. \n\nThe vulnerability is in [this part](https://github.com/xwikisas/identity-oauth/blob/master/ui/src/main/resources/IdentityOAuth/LoginUIExtension.vm#L58) of the code.\n\n### Patches\nThe issue has been fixed in Identity OAuth version 1.6 by https://github.com/xwikisas/identity-oauth/commit/d805d3154b17c6bf455ddf5deb0a3461a3833bc6 . The fix is in the content of the [IdentityOAuth/LoginUIExtension](https://github.com/xwikisas/identity-oauth/commit/d805d3154b17c6bf455ddf5deb0a3461a3833bc6#diff-2ab2e0716443d790d7d798320e4a45151661f4eca5440331f4a227b29c87c188) file\n\n### Workarounds\nThere are no known workarounds besides upgrading.\n\n### References\n_Are there any links users can visit to find out more?_\n\n* Original report: https://jira.xwiki.org/browse/XWIKI-20719\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.xwiki.identity-oauth:identity-oauth-ui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0"
      }, {
        "fixed" : "1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xwikisas/identity-oauth/security/advisories/GHSA-h2rm-29ch-wfmh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-45144"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwikisas/identity-oauth/commit/d805d3154b17c6bf455ddf5deb0a3461a3833bc6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwikisas/identity-oauth/commit/d805d3154b17c6bf455ddf5deb0a3461a3833bc6#diff-2ab2e0716443d790d7d798320e4a45151661f4eca5440331f4a227b29c87c188"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xwikisas/identity-oauth"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwikisas/identity-oauth/blob/master/ui/src/main/resources/IdentityOAuth/LoginUIExtension.vm#L58"
  }, {
    "type" : "WEB",
    "url" : "https://jira.xwiki.org/browse/XWIKI-20719"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-10-17T12:51:01Z",
    "nvd_published_at" : "2023-10-16T21:15:11Z"
  }
}