Vulnerabilities in pkg:maven/org.xwiki.platform/xwiki-platform-realtime-ui

PACKAGE
Advisory Identifier: GHSA-r5vh-gc3r-r24w
Advisory Summary

CVE-2024-31988 is a CRITICAL (CVSS 9.6) remote code execution vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Xwiki platform realtime ui libraries in the Maven ecosystem. The issue involves xwiki platform csrf remote code execution through the realtime html converter api. Remediation is available by upgrading affected packages to version 14.10.19, 15.5.4, 15.9.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.xwiki.platform/xwiki-platform-realtime-ui

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-r5vh-gc3r-r24w CVE-2024-31988 CRITICAL XWiki Platform CSRF remote code execution through the realtime HTML Converter API

CVE-2024-31988 at a Glance

CVE Identifier CVE-2024-31988
GHSA Identifier GHSA-r5vh-gc3r-r24w
Severity CRITICAL
CVSS v3.1 Base Score 9.6
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Xwiki platform realtime ui
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.6

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:R/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 Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-31988

To remediate this vulnerability, upgrade all affected Xwiki platform realtime 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.

org.xwiki.platform:xwiki-platform-realtime-ui fixed: 14.10.19
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-realtime-ui</artifactId>
    <version>14.10.19</version>
</dependency>
org.xwiki.platform:xwiki-platform-realtime-ui fixed: 15.5.4
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-realtime-ui</artifactId>
    <version>15.5.4</version>
</dependency>
org.xwiki.platform:xwiki-platform-realtime-ui fixed: 15.9
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-realtime-ui</artifactId>
    <version>15.9</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-2024-31988, 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 realtime ui in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 14.10.19), 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-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Xwiki platform realtime 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 the realtime editor is installed in XWiki, it allows arbitrary remote code execution with the interaction of an admin user with programming right. More precisely, by getting an admin user to either visit a crafted URL or to view an image with this URL that could be in a comment, the attacker can get the admin to execute arbitrary XWiki syntax including scripting macros with Groovy or Python code. This compromises the confidentiality, integrity and availability of the whole XWiki installation. To reproduce on an XWiki installation, as an admin, click on `<xwiki-host>/xwiki/bin/get/RTFrontend/ConvertHTML?wiki=xwiki&space=Main&page=WebHome&text=%7B%7Bvelocity%7D%7D%24logtool.error%28%22Hello%20from%20Velocity%20%21%22%29%7B%7B%2Fvelocity%7D%7D`. If the error "Hello from Velocity!" gets logged then the installation is vulnerable. ### Patches This vulnerability has been patched in XWiki 14.10.19, 15.5.4 and 15.9. ### Workarounds Update `RTFrontend.ConvertHTML` following this [patch](https://github.com/xwiki/xwiki-platform/commit/4896712ee6483da623f131be2e618f1f2b79cb8d#diff-32a2a63950724b24e63587570cd95a41cf689111b8ba61c48dabee9effec6d61). This will, however, break some synchronization processes in the realtime editor, so upgrading should be the preferred way on installations where this editor is used. ### References * https://jira.xwiki.org/browse/XWIKI-21424 * https://github.com/xwiki/xwiki-platform/commit/4896712ee6483da623f131be2e618f1f2b79cb8d

CVE-2024-31988 Affected Xwiki platform realtime ui Versions

3 component(s)
Fixed Versions:
14.10.1915.5.415.9
Product / Package Ecosystem Affected Versions Fixed Version
org.xwiki.platform:xwiki-platform-realtime-ui
Maven
≥ 13.9-rc-1
< 14.10.19
14.10.19
org.xwiki.platform:xwiki-platform-realtime-ui
Maven
≥ 15.0-rc-1
< 15.5.4
15.5.4
org.xwiki.platform:xwiki-platform-realtime-ui
Maven
≥ 15.6-rc-1
< 15.9
15.9

References

Frequently Asked Questions

What is CVE-2024-31988?
CVE-2024-31988 is a security vulnerability in Xwiki platform realtime ui involving XWiki Platform CSRF remote code execution through the realtime HTML Converter API under CWE-352: Cross-Site Request Forgery (CSRF).
Which Xwiki platform realtime ui versions are affected?
Affected versions include releases prior to 14.10.19, 15.5.4, 15.9 across affected packages: org.xwiki.platform:xwiki-platform-realtime-ui.
What version fixes CVE-2024-31988?
Upgrading to 14.10.19, 15.5.4, 15.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xwiki-platform-realtime-ui affected?
Yes, org.xwiki.platform:xwiki-platform-realtime-ui is affected in releases prior to 14.10.19, 15.5.4, 15.9. Upgrade your dependency to 14.10.19, 15.5.4, 15.9 or later.
What is the CVSS score of CVE-2024-31988?
CVE-2024-31988 has a CVSS v3.1 base score of 9.6 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2024-31988?
CVE-2024-31988 is classified under CWE-352: Cross-Site Request Forgery (CSRF) (The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.).
How can I check Maven dependencies for CVE-2024-31988?
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-r5vh-gc3r-r24w",
  "modified" : "2024-04-10T22:01:48Z",
  "published" : "2024-04-10T17:14:59Z",
  "aliases" : [ "CVE-2024-31988" ],
  "summary" : "XWiki Platform CSRF remote code execution through the realtime HTML Converter API",
  "details" : "### Impact\nWhen the realtime editor is installed in XWiki, it allows arbitrary remote code execution with the interaction of an admin user with programming right. More precisely, by getting an admin user to either visit a crafted URL or to view an image with this URL that could be in a comment, the attacker can get the admin to execute arbitrary XWiki syntax including scripting macros with Groovy or Python code. This compromises the confidentiality, integrity and availability of the whole XWiki installation.\n\nTo reproduce on an XWiki installation, as an admin, click on `<xwiki-host>/xwiki/bin/get/RTFrontend/ConvertHTML?wiki=xwiki&space=Main&page=WebHome&text=%7B%7Bvelocity%7D%7D%24logtool.error%28%22Hello%20from%20Velocity%20%21%22%29%7B%7B%2Fvelocity%7D%7D`. If the error \"Hello from Velocity!\" gets logged then the installation is vulnerable.\n\n### Patches\nThis vulnerability has been patched in XWiki 14.10.19, 15.5.4 and 15.9.\n\n### Workarounds\nUpdate `RTFrontend.ConvertHTML` following this [patch](https://github.com/xwiki/xwiki-platform/commit/4896712ee6483da623f131be2e618f1f2b79cb8d#diff-32a2a63950724b24e63587570cd95a41cf689111b8ba61c48dabee9effec6d61).\nThis will, however, break some synchronization processes in the realtime editor, so upgrading should be the preferred way on installations where this editor is used.\n\n### References\n* https://jira.xwiki.org/browse/XWIKI-21424\n* https://github.com/xwiki/xwiki-platform/commit/4896712ee6483da623f131be2e618f1f2b79cb8d\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-realtime-ui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "13.9-rc-1"
      }, {
        "fixed" : "14.10.19"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-realtime-ui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0-rc-1"
      }, {
        "fixed" : "15.5.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-realtime-ui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.6-rc-1"
      }, {
        "fixed" : "15.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-r5vh-gc3r-r24w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-31988"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/commit/4896712ee6483da623f131be2e618f1f2b79cb8d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/commit/9f8cc88497418750b09ce9fde5d67d840f038fbf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/commit/d88da4572fb7d4f95e1f54bb0cce33fce3df08d9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/commit/d9f5043da289ff106f08e23576746fd8baf98794"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xwiki/xwiki-platform"
  }, {
    "type" : "WEB",
    "url" : "https://jira.xwiki.org/browse/XWIKI-21424"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-352" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-10T17:14:59Z",
    "nvd_published_at" : "2024-04-10T21:15:07Z"
  }
}