CVE-2023-26479: Xwiki platform rendering parser Xwiki Vulnerable To Improper Handling Vulnerability

MODERATE
Advisory Identifier: GHSA-52vf-hvv3-98h7
CVSS 6.5
CWE-755
Published
Advisory Summary

CVE-2023-26479 is a MODERATE (CVSS 6.5) xwiki vulnerable to improper handling vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting Xwiki platform rendering parser libraries in the Maven ecosystem. The issue involves xwiki vulnerable to improper handling of exceptional conditions. Remediation is available by upgrading affected packages to version 13.10.10, 14.4.6, 14.9-rc-1.

CVE-2023-26479 at a Glance

CVE Identifier CVE-2023-26479
GHSA Identifier GHSA-52vf-hvv3-98h7
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-755: Improper Handling of Exceptional Conditions
Affected Product Xwiki platform rendering parser
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:N/I:N/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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2023-26479

To remediate this vulnerability, upgrade all affected Xwiki platform rendering parser 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-rendering-parser fixed: 13.10.10
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-rendering-parser</artifactId>
    <version>13.10.10</version>
</dependency>
org.xwiki.platform:xwiki-platform-rendering-parser fixed: 14.4.6
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-rendering-parser</artifactId>
    <version>14.4.6</version>
</dependency>
org.xwiki.platform:xwiki-platform-rendering-parser fixed: 14.9-rc-1
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-rendering-parser</artifactId>
    <version>14.9-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-26479, 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 rendering parser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 13.10.10), 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-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In Xwiki platform rendering parser, 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 Users with write rights can insert well-formed content that is not handled well by the parser. For instance, with `xwiki/2.1`, inserting a deeply nested group blocks (`((( ((( ((( ((( .... ))) ))) ))) )))` (see the generator below to produce a large payload) can lead to the parser throwing a `StackOverflowError`. As a consequence, some pages becomes unusable, including: - the user index (if the page containing the faulty content is a user page) - the page index Note that on the page, the normal UI is completely missing and it is not possible to open the editor directly to revert the change as the stack overflow is already triggered while getting the title of the document. This means that it is quite difficult to remove this content once inserted. ### Patches This has been patched on XWiki 13.10.10, 14.4.6, and 14.9-rc-1. ### Workarounds A temporary solution to avoid Stack Overflow errors is to increase the memory allocated to the stack by using the `-Xss` JVM parameter (e.g., `-Xss32m`). This should allow the parser to pass and to fix the faulty content. Note that we did not evaluated the consequence on other aspects of the system (e.g., performances), and should be only be used as a temporary solution. Also, this does not prevent the issue to occur again with another content. Consequently, it is strongly advised to upgrade to a version where the issue has been patched. ### References - https://jira.xwiki.org/browse/XWIKI-19838 ### For more information If you have any questions or comments about this advisory: - Open an issue in [Jira](http://jira.xwiki.org/) - Email us at [Security ML](mailto:security@xwiki.org) ### Payload Generator The Javascript code below produces 32768 nested group blocks, around the `Hello` text. ```javascript let result = "(((\nHello\n)))"; for (let i = 0; i < 15; ++i) { result = result.replace("Hello", result); } console.log(result); ```

CVE-2023-26479 Affected Xwiki platform rendering parser Versions

3 component(s)
Fixed Versions:
13.10.1014.4.614.9-rc-1
Product / Package Ecosystem Affected Versions Fixed Version
org.xwiki.platform:xwiki-platform-rendering-parser
Maven
≥ 6.0
< 13.10.10
13.10.10
org.xwiki.platform:xwiki-platform-rendering-parser
Maven
≥ 14.0
< 14.4.6
14.4.6
org.xwiki.platform:xwiki-platform-rendering-parser
Maven
≥ 14.5
< 14.9-rc-1
14.9-rc-1

References

Frequently Asked Questions

What is CVE-2023-26479?
CVE-2023-26479 is a security vulnerability in Xwiki platform rendering parser involving xwiki vulnerable to Improper Handling of Exceptional Conditions under CWE-755: Improper Handling of Exceptional Conditions.
Which Xwiki platform rendering parser versions are affected?
Affected versions include releases prior to 13.10.10, 14.4.6, 14.9-rc-1 across affected packages: org.xwiki.platform:xwiki-platform-rendering-parser.
What version fixes CVE-2023-26479?
Upgrading to 13.10.10, 14.4.6, 14.9-rc-1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xwiki-platform-rendering-parser affected?
Yes, org.xwiki.platform:xwiki-platform-rendering-parser is affected in releases prior to 13.10.10, 14.4.6, 14.9-rc-1. Upgrade your dependency to 13.10.10, 14.4.6, 14.9-rc-1 or later.
What is the CVSS score of CVE-2023-26479?
CVE-2023-26479 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2023-26479?
CVE-2023-26479 is classified under CWE-755: Improper Handling of Exceptional Conditions (The product does not handle or incorrectly handles an exceptional condition.).
How can I check Maven dependencies for CVE-2023-26479?
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-52vf-hvv3-98h7",
  "modified" : "2023-03-03T22:53:35Z",
  "published" : "2023-03-03T22:53:35Z",
  "aliases" : [ "CVE-2023-26479" ],
  "summary" : "xwiki vulnerable to Improper Handling of Exceptional Conditions",
  "details" : "### Impact\nUsers with write rights can insert well-formed content that is not handled well by the parser. For instance, with `xwiki/2.1`, inserting a deeply nested group blocks (`((( ((( ((( ((( .... ))) ))) ))) )))` (see the generator below to produce a large payload) can lead to the parser throwing a `StackOverflowError`.\nAs a consequence, some pages becomes unusable, including:\n- the user index (if the page containing the faulty content is a user page)\n- the page index\n\nNote that on the page, the normal UI is completely missing and it is not possible to open the editor directly to revert the change as the stack overflow is already triggered while getting the title of the document. This means that it is quite difficult to remove this content once inserted.\n\n### Patches\nThis has been patched on XWiki 13.10.10, 14.4.6, and 14.9-rc-1.\n\n### Workarounds\nA temporary solution to avoid Stack Overflow errors is to increase the memory allocated to the stack by using the `-Xss` JVM parameter (e.g., `-Xss32m`). This should allow the parser to pass and to fix the faulty content.\nNote that we did not evaluated the consequence on other aspects of the system (e.g., performances), and should be only be used as a temporary solution.\nAlso, this does not prevent the issue to occur again with another content.\nConsequently, it is strongly advised to upgrade to a version where the issue has been patched.\n\n### References\n- https://jira.xwiki.org/browse/XWIKI-19838\n\n### For more information\nIf you have any questions or comments about this advisory:\n- Open an issue in [Jira](http://jira.xwiki.org/)\n- Email us at [Security ML](mailto:security@xwiki.org)\n\n### Payload Generator\n\nThe Javascript code below produces 32768 nested group blocks, around the `Hello` text.\n\n```javascript\nlet result = \"(((\\nHello\\n)))\";\nfor (let i = 0; i < 15; ++i) {\n  result = result.replace(\"Hello\", result);\n}\nconsole.log(result);\n```\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-rendering-parser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0"
      }, {
        "fixed" : "13.10.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-rendering-parser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "14.0"
      }, {
        "fixed" : "14.4.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-rendering-parser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "14.5"
      }, {
        "fixed" : "14.9-rc-1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-52vf-hvv3-98h7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-26479"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/commit/e5b82cd98072464196a468b8f7fe6396dce142a7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xwiki/xwiki-platform"
  }, {
    "type" : "WEB",
    "url" : "https://jira.xwiki.org/browse/XWIKI-19838"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-755" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-03T22:53:35Z",
    "nvd_published_at" : "2023-03-02T18:15:00Z"
  }
}