CVE-2023-37912: Xwiki rendering macro footnotes XWiki Rendering's Footnote Macro Vulnerable Vulnerability

HIGH
Advisory Identifier: GHSA-35j5-m29r-xfq5
CVSS 8.8
CWE-270
Published
Advisory Summary

CVE-2023-37912 is a HIGH (CVSS 8.8) xwiki rendering's footnote macro vulnerable vulnerability (CWE-270: Privilege Context Switching Error) affecting Xwiki rendering macro footnotes libraries in the Maven ecosystem. The issue involves xwiki rendering's footnote macro vulnerable to privilege escalation via the footnote macro. Remediation is available by upgrading affected packages to version 14.10.6, 15.1-rc-1.

CVE-2023-37912 at a Glance

CVE Identifier CVE-2023-37912
GHSA Identifier GHSA-35j5-m29r-xfq5
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-270: Privilege Context Switching Error
Affected Product Xwiki rendering macro footnotes
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-37912

To remediate this vulnerability, upgrade all affected Xwiki rendering macro footnotes 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.rendering:xwiki-rendering-macro-footnotes fixed: 14.10.6
<dependency>
    <groupId>org.xwiki.rendering</groupId>
    <artifactId>xwiki-rendering-macro-footnotes</artifactId>
    <version>14.10.6</version>
</dependency>
org.xwiki.rendering:xwiki-rendering-macro-footnotes fixed: 15.1-rc-1
<dependency>
    <groupId>org.xwiki.rendering</groupId>
    <artifactId>xwiki-rendering-macro-footnotes</artifactId>
    <version>15.1-rc-1</version>
</dependency>
org.xwiki.platform:xwiki-core-rendering-macro-footnotes fixed: 14.10.6
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-core-rendering-macro-footnotes</artifactId>
    <version>14.10.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=org.xwiki.rendering

How to Check if You Are Affected

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

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

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

Note: The mvn dependency:tree -Dincludes=org.xwiki.rendering 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-270: Privilege Context Switching Error, where the product does not properly manage privileges while it is switching between different contexts that have different privileges or spheres of control. In Xwiki rendering macro footnotes, 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 The footnote macro executed its content in a potentially different context than the one in which it was defined. In particular in combination with the include macro, this allows privilege escalation from a simple user account in XWiki to programming rights and thus remote code execution, impacting the confidentiality, integrity and availability of the whole XWiki installation. To reproduce, perform the following steps: 1. Edit your user profile with the object editor and add an object of type DocumentSheetBinding with value XWiki.ClassSheet 2. Edit your user profile with the wiki editor and add the syntax `{{footnote}}{{groovy}}println("Hello " + "from groovy!"){{/groovy}}{{/footnote}}` When the text "Hello from groovy!" is displayed at the bottom of the document, the installation is vulnerable. Instead, an error should be displayed. ### Patches This vulnerability has been patched in XWiki 14.10.6 and 15.1-rc-1. ### Workarounds There is no workaround apart from upgrading to a fixed version of the footnote macro. ### References * https://jira.xwiki.org/browse/XRENDERING-688 * https://github.com/xwiki/xwiki-rendering/commit/5f558b8fac8b716d19999225f38cb8ed0814116e

CVE-2023-37912 Affected Xwiki rendering macro footnotes Versions

3 component(s)
Fixed Versions:
14.10.615.1-rc-1
Product / Package Ecosystem Affected Versions Fixed Version
org.xwiki.rendering:xwiki-rendering-macro-footnotes
Maven
< 14.10.6
14.10.6
org.xwiki.rendering:xwiki-rendering-macro-footnotes
Maven
≥ 15.0-rc-1
< 15.1-rc-1
15.1-rc-1
org.xwiki.platform:xwiki-core-rendering-macro-footnotes
Maven
< 14.10.6
14.10.6

References

Frequently Asked Questions

What is CVE-2023-37912?
CVE-2023-37912 is a security vulnerability in Xwiki rendering macro footnotes involving XWiki Rendering's footnote macro vulnerable to privilege escalation via the footnote macro under CWE-270: Privilege Context Switching Error.
Which Xwiki rendering macro footnotes versions are affected?
Affected versions include releases prior to 14.10.6, 15.1-rc-1 across affected packages: org.xwiki.rendering:xwiki-rendering-macro-footnotes, org.xwiki.platform:xwiki-core-rendering-macro-footnotes.
What version fixes CVE-2023-37912?
Upgrading to 14.10.6, 15.1-rc-1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xwiki-rendering-macro-footnotes affected?
Yes, org.xwiki.rendering:xwiki-rendering-macro-footnotes is affected in releases prior to 14.10.6, 15.1-rc-1. Upgrade your dependency to 14.10.6, 15.1-rc-1 or later.
Is xwiki-core-rendering-macro-footnotes affected?
Yes, org.xwiki.platform:xwiki-core-rendering-macro-footnotes is affected in releases prior to 14.10.6. Upgrade your dependency to 14.10.6 or later.
What is the CVSS score of CVE-2023-37912?
CVE-2023-37912 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-37912?
CVE-2023-37912 is classified under CWE-270: Privilege Context Switching Error (The product does not properly manage privileges while it is switching between different contexts that have different privileges or spheres of control.).
How can I check Maven dependencies for CVE-2023-37912?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.xwiki.rendering'. 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-35j5-m29r-xfq5",
  "modified" : "2023-11-01T06:11:10Z",
  "published" : "2023-10-25T21:07:42Z",
  "aliases" : [ "CVE-2023-37912" ],
  "summary" : "XWiki Rendering's footnote macro vulnerable to privilege escalation via the footnote macro",
  "details" : "### Impact\n\nThe footnote macro executed its content in a potentially different context than the one in which it was defined. In particular in combination with the include macro, this allows privilege escalation from a simple user account in XWiki to programming rights and thus remote code execution, impacting the confidentiality, integrity and availability of the whole XWiki installation.\n\nTo reproduce, perform the following steps:\n\n1. Edit your user profile with the object editor and add an object of type DocumentSheetBinding with value XWiki.ClassSheet\n2. Edit your user profile with the wiki editor and add the syntax `{{footnote}}{{groovy}}println(\"Hello \" + \"from groovy!\"){{/groovy}}{{/footnote}}`\n\nWhen the text \"Hello from groovy!\" is displayed at the bottom of the document, the installation is vulnerable. Instead, an error should be displayed.\n\n### Patches\nThis vulnerability has been patched in XWiki 14.10.6 and 15.1-rc-1.\n\n### Workarounds\nThere is no workaround apart from upgrading to a fixed version of the footnote macro.\n\n### References\n* https://jira.xwiki.org/browse/XRENDERING-688\n* https://github.com/xwiki/xwiki-rendering/commit/5f558b8fac8b716d19999225f38cb8ed0814116e\n",
  "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.rendering:xwiki-rendering-macro-footnotes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.10.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.rendering:xwiki-rendering-macro-footnotes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0-rc-1"
      }, {
        "fixed" : "15.1-rc-1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-core-rendering-macro-footnotes"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.10.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-rendering/security/advisories/GHSA-35j5-m29r-xfq5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-37912"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-rendering/commit/5f558b8fac8b716d19999225f38cb8ed0814116e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xwiki/xwiki-rendering"
  }, {
    "type" : "WEB",
    "url" : "https://jira.xwiki.org/browse/XRENDERING-688"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-270" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-10-25T21:07:42Z",
    "nvd_published_at" : "2023-10-25T18:17:28Z"
  }
}