Vulnerabilities in pkg:maven/org.xwiki.platform/xwiki-platform-menu

PACKAGE
Advisory Identifier: GHSA-v2rr-xw95-wcjx
Advisory Summary

CVE-2023-37909 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Xwiki platform menu libraries in the Maven ecosystem. The issue involves privilege escalation (pr)/remote code execution from account through menu.uiextensionsheet. Remediation is available by upgrading affected packages to version 14.10.8, 15.3-rc-1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.xwiki.platform/xwiki-platform-menu

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.xwiki.platform/xwiki-platform-menu. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-v2rr-xw95-wcjx CVE-2023-37909 HIGH Privilege escalation (PR)/remote code execution from account through Menu.UIExtensionSheet

CVE-2023-37909 at a Glance

CVE Identifier CVE-2023-37909
GHSA Identifier GHSA-v2rr-xw95-wcjx
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Xwiki platform menu
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.8

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

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

How to Fix CVE-2023-37909

To remediate this vulnerability, upgrade all affected Xwiki platform menu 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.platform:xwiki-platform-menu fixed: 14.10.8
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-menu</artifactId>
    <version>14.10.8</version>
</dependency>
org.xwiki.platform:xwiki-platform-menu-ui fixed: 14.10.8
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-menu-ui</artifactId>
    <version>14.10.8</version>
</dependency>
org.xwiki.platform:xwiki-platform-menu-ui fixed: 15.3-rc-1
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-menu-ui</artifactId>
    <version>15.3-rc-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.platform

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.xwiki.platform

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

Note: The mvn dependency:tree -Dincludes=org.xwiki.platform 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Xwiki platform menu, 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 Any user who can edit their own user profile can execute arbitrary script macros including Groovy and Python macros that allow remote code execution including unrestricted read and write access to all wiki contents. This can be reproduced with the following steps: 1. As an advanced user, use the object editor to add an object of type `UIExtensionClass` to your user profile. Set the value "Extension Point ID" to `{{/html}}{{async async=false cache=false}}{{groovy}}println("Hello from Groovy!"){{/groovy}}{{/async}}` 2. Open `<xwiki-host>/xwiki/bin/edit/XWiki/<username>?sheet=Menu.UIExtensionSheet` where `<xwiki-host>` is the URL of your XWiki installation and `<username>` is your user name. If the text `Hello from Groovy!" selected="selected">` is displayed in the output, the attack succeeded. ### Patches This has been patched in XWiki 14.10.8 and 15.3 RC1 by adding proper escaping. ### Workarounds The [patch](https://github.com/xwiki/xwiki-platform/commit/9e8f080094333dec63a8583229a3799208d773be#diff-47a5652d0c8e4601dac12bd9ab34b8bd688cb22a1b758ce7b774043658834662) can be manually applied to the document `Menu.UIExtensionSheet`, only three lines need to be changed. ### References * https://jira.xwiki.org/browse/XWIKI-20746 * https://github.com/xwiki/xwiki-platform/commit/9e8f080094333dec63a8583229a3799208d773be

CVE-2023-37909 Affected Xwiki platform menu Versions

3 component(s)
Fixed Versions:
14.10.815.3-rc-1
Product / Package Ecosystem Affected Versions Fixed Version
org.xwiki.platform:xwiki-platform-menu
Maven
≥ 5.1-rc-1
< 14.10.8
14.10.8
org.xwiki.platform:xwiki-platform-menu-ui
Maven
≥ 5.1-rc-1
< 14.10.8
14.10.8
org.xwiki.platform:xwiki-platform-menu-ui
Maven
≥ 15.0-rc-1
< 15.3-rc-1
15.3-rc-1

References

Frequently Asked Questions

What is CVE-2023-37909?
CVE-2023-37909 is a security vulnerability in Xwiki platform menu involving Privilege escalation (PR)/remote code execution from account through Menu.UIExtensionSheet under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Xwiki platform menu versions are affected?
Affected versions include releases prior to 14.10.8, 15.3-rc-1 across affected packages: org.xwiki.platform:xwiki-platform-menu, org.xwiki.platform:xwiki-platform-menu-ui.
What version fixes CVE-2023-37909?
Upgrading to 14.10.8, 15.3-rc-1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xwiki-platform-menu affected?
Yes, org.xwiki.platform:xwiki-platform-menu is affected in releases prior to 14.10.8. Upgrade your dependency to 14.10.8 or later.
Is xwiki-platform-menu-ui affected?
Yes, org.xwiki.platform:xwiki-platform-menu-ui is affected in releases prior to 14.10.8, 15.3-rc-1. Upgrade your dependency to 14.10.8, 15.3-rc-1 or later.
What is the CVSS score of CVE-2023-37909?
CVE-2023-37909 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2023-37909?
CVE-2023-37909 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2023-37909?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.xwiki.platform'. 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-v2rr-xw95-wcjx",
  "modified" : "2023-11-01T05:55:39Z",
  "published" : "2023-10-25T21:03:11Z",
  "aliases" : [ "CVE-2023-37909" ],
  "summary" : "Privilege escalation (PR)/remote code execution from account through Menu.UIExtensionSheet",
  "details" : "### Impact\nAny user who can edit their own user profile can execute arbitrary script macros including Groovy and Python macros that allow remote code execution including unrestricted read and write access to all wiki contents. This can be reproduced with the following steps:\n\n1. As an advanced user, use the object editor to add an object of type `UIExtensionClass` to your user profile. Set the value \"Extension Point ID\" to `{{/html}}{{async async=false cache=false}}{{groovy}}println(\"Hello from Groovy!\"){{/groovy}}{{/async}}`\n2. Open `<xwiki-host>/xwiki/bin/edit/XWiki/<username>?sheet=Menu.UIExtensionSheet` where `<xwiki-host>` is the URL of your XWiki installation and `<username>` is your user name.\n\nIf the text `Hello from Groovy!\" selected=\"selected\">` is displayed in the output, the attack succeeded.\n\n### Patches\n\nThis has been patched in XWiki 14.10.8 and 15.3 RC1 by adding proper escaping.\n\n### Workarounds\nThe [patch](https://github.com/xwiki/xwiki-platform/commit/9e8f080094333dec63a8583229a3799208d773be#diff-47a5652d0c8e4601dac12bd9ab34b8bd688cb22a1b758ce7b774043658834662) can be manually applied to the document `Menu.UIExtensionSheet`, only three lines need to be changed.\n\n### References\n\n* https://jira.xwiki.org/browse/XWIKI-20746\n* https://github.com/xwiki/xwiki-platform/commit/9e8f080094333dec63a8583229a3799208d773be",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-menu"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.1-rc-1"
      }, {
        "fixed" : "14.10.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-menu-ui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.1-rc-1"
      }, {
        "fixed" : "14.10.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-menu-ui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0-rc-1"
      }, {
        "fixed" : "15.3-rc-1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-v2rr-xw95-wcjx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-37909"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/commit/9e8f080094333dec63a8583229a3799208d773be"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xwiki/xwiki-platform"
  }, {
    "type" : "WEB",
    "url" : "https://jira.xwiki.org/browse/XWIKI-20746"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94", "CWE-95" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-10-25T21:03:11Z",
    "nvd_published_at" : "2023-10-25T18:17:28Z"
  }
}