CVE-2023-22457: Application ckeditor ui Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-6mjp-2rm6-9g85
CVSS 9.0
CWE-352
Published
Advisory Summary

CVE-2023-22457 is a CRITICAL (CVSS 9.0) remote code execution vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Application ckeditor ui libraries in the Maven ecosystem. The issue involves xwiki ckeditor.htmlconverter vulnerable to remote code execution via cross-site request forgery. Remediation is available by upgrading affected packages to version 1.64.3.

CVE-2023-22457 at a Glance

CVE Identifier CVE-2023-22457
GHSA Identifier GHSA-6mjp-2rm6-9g85
Severity CRITICAL
CVSS v3.1 Base Score 9.0
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Application ckeditor ui
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.0

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-2023-22457

To remediate this vulnerability, upgrade all affected Application ckeditor 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.contrib:application-ckeditor-ui fixed: 1.64.3
<dependency>
    <groupId>org.xwiki.contrib</groupId>
    <artifactId>application-ckeditor-ui</artifactId>
    <version>1.64.3</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

How to Check if You Are Affected

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

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

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

Note: The mvn dependency:tree -Dincludes=org.xwiki.contrib 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 Application ckeditor 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 The `CKEditor.HTMLConverter` document lacked a protection against Cross-Site Request Forgery (CSRF), allowing to execute macros with the rights of the current user. If a privileged user with programming rights was tricked into executing a GET request to this document with certain parameters (e.g., via an image with a corresponding URL embedded in a comment or via a redirect), this would allow arbitrary remote code execution and the attacker could gain rights, access private information or impact the availability of the wiki. The attack can be demonstrated by accessing the URL `<server>/xwiki/bin/view/Main?sheet=CKEditor.HTMLConverter&language=en&sourceSyntax=xwiki%2F2.1&stripHTMLEnvelope=true&fromHTML=false&toHTML=true&text=%7B%7Bgroovy%7D%7Dprintln%28%22Hello+from+Groovy%21%22%29%7B%7B%2Fgroovy%7D%7D` where `<server>` is the URL of the XWiki installation as a user with programming rights. If this displays the text "Hello from Groovy!", the installation is vulnerable. ### Patches The issue has been patched in the CKEditor Integration version 1.64.3. This has also been patched in the version of the CKEditor integration that is bundled starting with XWiki 14.6 RC1. ### Workarounds There are no known workarounds for this other than upgrading the CKEditor integration to a fixed version. ### References * https://github.com/xwiki-contrib/application-ckeditor/commit/6b1053164386aefc526df7512bc664918aa6849b * https://jira.xwiki.org/browse/CKEDITOR-475 ### For more information If you have any questions or comments about this advisory: * Open an issue in [Jira XWiki.org](https://jira.xwiki.org/) * Email us at [Security Mailing List](mailto:security@xwiki.org)

CVE-2023-22457 Affected Application ckeditor ui Versions

1 component(s)
Fixed Versions:
1.64.3
Product / Package Ecosystem Affected Versions Fixed Version
org.xwiki.contrib:application-ckeditor-ui
Maven
< 1.64.3
1.64.3

References

Frequently Asked Questions

What is CVE-2023-22457?
CVE-2023-22457 is a security vulnerability in Application ckeditor ui involving XWiki CKEditor.HTMLConverter vulnerable to Remote Code Execution via Cross-Site Request Forgery under CWE-352: Cross-Site Request Forgery (CSRF).
Which Application ckeditor ui versions are affected?
Affected versions include releases prior to 1.64.3 across affected packages: org.xwiki.contrib:application-ckeditor-ui.
What version fixes CVE-2023-22457?
Upgrading to 1.64.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is application-ckeditor-ui affected?
Yes, org.xwiki.contrib:application-ckeditor-ui is affected in releases prior to 1.64.3. Upgrade your dependency to 1.64.3 or later.
What is the CVSS score of CVE-2023-22457?
CVE-2023-22457 has a CVSS v3.1 base score of 9.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2023-22457?
CVE-2023-22457 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-2023-22457?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.xwiki.contrib'. 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-6mjp-2rm6-9g85",
  "modified" : "2023-01-10T21:42:55Z",
  "published" : "2023-01-06T17:15:47Z",
  "aliases" : [ "CVE-2023-22457" ],
  "summary" : "XWiki CKEditor.HTMLConverter vulnerable to Remote Code Execution via Cross-Site Request Forgery",
  "details" : "### Impact\nThe `CKEditor.HTMLConverter` document lacked a protection against Cross-Site Request Forgery (CSRF), allowing to execute macros with the rights of the current user. If a privileged user with programming rights was tricked into executing a GET request to this document with certain parameters (e.g., via an image with a corresponding URL embedded in a comment or via a redirect), this would allow arbitrary remote code execution and the attacker could gain rights, access private information or impact the availability of the wiki.\n\nThe attack can be demonstrated by accessing the URL `<server>/xwiki/bin/view/Main?sheet=CKEditor.HTMLConverter&language=en&sourceSyntax=xwiki%2F2.1&stripHTMLEnvelope=true&fromHTML=false&toHTML=true&text=%7B%7Bgroovy%7D%7Dprintln%28%22Hello+from+Groovy%21%22%29%7B%7B%2Fgroovy%7D%7D` where `<server>` is the URL of the XWiki installation as a user with programming rights. If this displays the text \"Hello from Groovy!\", the installation is vulnerable.\n\n### Patches\nThe issue has been patched in the CKEditor Integration version 1.64.3. This has also been patched in the version of the CKEditor integration that is bundled starting with XWiki 14.6 RC1.\n\n### Workarounds\nThere are no known workarounds for this other than upgrading the CKEditor integration to a fixed version.\n\n### References\n* https://github.com/xwiki-contrib/application-ckeditor/commit/6b1053164386aefc526df7512bc664918aa6849b\n* https://jira.xwiki.org/browse/CKEDITOR-475\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki.org](https://jira.xwiki.org/)\n* Email us at [Security Mailing List](mailto:security@xwiki.org)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.contrib:application-ckeditor-ui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.64.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xwiki-contrib/application-ckeditor/security/advisories/GHSA-6mjp-2rm6-9g85"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22457"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki-contrib/application-ckeditor/commit/6b1053164386aefc526df7512bc664918aa6849b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xwiki-contrib/application-ckeditor"
  }, {
    "type" : "WEB",
    "url" : "https://jira.xwiki.org/browse/CKEDITOR-475"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-352" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-06T17:15:47Z",
    "nvd_published_at" : "2023-01-04T15:15:00Z"
  }
}