Vulnerabilities in pkg:maven/org.xwiki.platform/xwiki-platform-icon-script

PACKAGE
Advisory Identifier: GHSA-fm68-j7ww-h9xf
Advisory Summary

CVE-2023-36470 is a CRITICAL (CVSS 9.9) xwiki platform vulnerable to code vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Xwiki platform icon default libraries in the Maven ecosystem. The issue involves xwiki platform vulnerable to code injection in icon themes. Remediation is available by upgrading affected packages to version 14.10.6, 15.2-rc-1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.xwiki.platform/xwiki-platform-icon-script

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-fm68-j7ww-h9xf CVE-2023-36470 CRITICAL XWiki Platform vulnerable to Code Injection in icon themes

CVE-2023-36470 at a Glance

CVE Identifier CVE-2023-36470
GHSA Identifier GHSA-fm68-j7ww-h9xf
Severity CRITICAL
CVSS v3.1 Base Score 9.9
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Xwiki platform icon default
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.9

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

How to Fix CVE-2023-36470

To remediate this vulnerability, upgrade all affected Xwiki platform icon default 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-icon-default fixed: 14.10.6
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-icon-default</artifactId>
    <version>14.10.6</version>
</dependency>
org.xwiki.platform:xwiki-platform-icon-script fixed: 14.10.6
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-icon-script</artifactId>
    <version>14.10.6</version>
</dependency>
org.xwiki.platform:xwiki-platform-icon-script fixed: 15.2-rc-1
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-icon-script</artifactId>
    <version>15.2-rc-1</version>
</dependency>
org.xwiki.platform:xwiki-platform-icon-default fixed: 15.2-rc-1
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-icon-default</artifactId>
    <version>15.2-rc-1</version>
</dependency>
org.xwiki.platform:xwiki-platform-icon-ui fixed: 14.10.6
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-icon-ui</artifactId>
    <version>14.10.6</version>
</dependency>
org.xwiki.platform:xwiki-platform-icon-ui fixed: 15.2-rc-1
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-icon-ui</artifactId>
    <version>15.2-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-36470, 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 icon default 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.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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Xwiki platform icon default, 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 By either creating a new or editing an existing document with an icon set, an attacker can inject XWiki syntax and Velocity code that is executed with programming rights and thus allows remote code execution. There are different attack vectors, the simplest is the Velocity code in the icon set's HTML or XWiki syntax definition. The [icon picker](https://extensions.xwiki.org/xwiki/bin/view/Extension/Icon%20Theme%20Application#HIconPicker) can be used to trigger the rendering of any icon set. The XWiki syntax variant of the icon set is also used without any escaping in some documents, allowing to inject XWiki syntax including script macros into a document that might have programming right, for this the currently used icon theme needs to be edited. Further, the HTML output of the icon set is output as JSON in the icon picker and this JSON is interpreted as XWiki syntax, allowing again the injection of script macros into a document with programming right and thus allowing remote code execution. This impacts the confidentiality, integrity and availability of the whole XWiki instance. ### Patches This has been patched in XWiki 14.10.6 and 15.1. Icon themes now require script right and the code in the icon theme is executed within the context of the icon theme, preventing any rights escalation. A macro for displaying icons has been introduced to avoid injecting the raw wiki syntax of an icon set into another document. ### Workarounds There are no workarounds apart from upgrading to a version containing the fix. ### References * https://jira.xwiki.org/browse/XWIKI-20524 * https://github.com/xwiki/xwiki-platform/commit/b0cdfd893912baaa053d106a92e39fa1858843c7 * https://github.com/xwiki/xwiki-platform/commit/46b542854978e9caa687a5c2b8817b8b17877d94 * https://github.com/xwiki/xwiki-platform/commit/79418dd92ca11941b46987ef881bf50424898ff4

CVE-2023-36470 Affected Xwiki platform icon default Versions

6 component(s)
Fixed Versions:
14.10.615.2-rc-1
Product / Package Ecosystem Affected Versions Fixed Version
org.xwiki.platform:xwiki-platform-icon-default
Maven
≥ 6.2-milestone-1
< 14.10.6
14.10.6
org.xwiki.platform:xwiki-platform-icon-script
Maven
≥ 6.2-milestone-1
< 14.10.6
14.10.6
org.xwiki.platform:xwiki-platform-icon-script
Maven
≥ 15.0-rc-1
< 15.2-rc-1
15.2-rc-1
org.xwiki.platform:xwiki-platform-icon-default
Maven
≥ 15.0-rc-1
< 15.2-rc-1
15.2-rc-1
org.xwiki.platform:xwiki-platform-icon-ui
Maven
≥ 6.2-milestone-1
< 14.10.6
14.10.6
org.xwiki.platform:xwiki-platform-icon-ui
Maven
≥ 15.0-rc-1
< 15.2-rc-1
15.2-rc-1

References

Frequently Asked Questions

What is CVE-2023-36470?
CVE-2023-36470 is a security vulnerability in Xwiki platform icon default involving XWiki Platform vulnerable to Code Injection in icon themes under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Xwiki platform icon default versions are affected?
Affected versions include releases prior to 14.10.6, 15.2-rc-1 across affected packages: org.xwiki.platform:xwiki-platform-icon-default, org.xwiki.platform:xwiki-platform-icon-script, org.xwiki.platform:xwiki-platform-icon-ui.
What version fixes CVE-2023-36470?
Upgrading to 14.10.6, 15.2-rc-1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xwiki-platform-icon-default affected?
Yes, org.xwiki.platform:xwiki-platform-icon-default is affected in releases prior to 14.10.6, 15.2-rc-1. Upgrade your dependency to 14.10.6, 15.2-rc-1 or later.
Is xwiki-platform-icon-script affected?
Yes, org.xwiki.platform:xwiki-platform-icon-script is affected in releases prior to 14.10.6, 15.2-rc-1. Upgrade your dependency to 14.10.6, 15.2-rc-1 or later.
What is the CVSS score of CVE-2023-36470?
CVE-2023-36470 has a CVSS v3.1 base score of 9.9 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2023-36470?
CVE-2023-36470 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check Maven dependencies for CVE-2023-36470?
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-fm68-j7ww-h9xf",
  "modified" : "2023-06-30T20:41:57Z",
  "published" : "2023-06-30T20:41:57Z",
  "aliases" : [ "CVE-2023-36470" ],
  "summary" : "XWiki Platform vulnerable to Code Injection in icon themes",
  "details" : "### Impact\nBy either creating a new or editing an existing document with an icon set, an attacker can inject XWiki syntax and Velocity code that is executed with programming rights and thus allows remote code execution. There are different attack vectors, the simplest is the Velocity code in the icon set's HTML or XWiki syntax definition. The [icon picker](https://extensions.xwiki.org/xwiki/bin/view/Extension/Icon%20Theme%20Application#HIconPicker) can be used to trigger the rendering of any icon set. The XWiki syntax variant of the icon set is also used without any escaping in some documents, allowing to inject XWiki syntax including script macros into a document that might have programming right, for this the currently used icon theme needs to be edited. Further, the HTML output of the icon set is output as JSON in the icon picker and this JSON is interpreted as XWiki syntax, allowing again the injection of script macros into a document with programming right and thus allowing remote code execution. This impacts the confidentiality, integrity and availability of the whole XWiki instance.\n\n### Patches\n\nThis has been patched in XWiki 14.10.6 and 15.1. Icon themes now require script right and the code in the icon theme is executed within the context of the icon theme, preventing any rights escalation. A macro for displaying icons has been introduced to avoid injecting the raw wiki syntax of an icon set into another document.\n\n### Workarounds\nThere are no workarounds apart from upgrading to a version containing the fix.\n\n### References\n\n* https://jira.xwiki.org/browse/XWIKI-20524\n* https://github.com/xwiki/xwiki-platform/commit/b0cdfd893912baaa053d106a92e39fa1858843c7\n* https://github.com/xwiki/xwiki-platform/commit/46b542854978e9caa687a5c2b8817b8b17877d94\n* https://github.com/xwiki/xwiki-platform/commit/79418dd92ca11941b46987ef881bf50424898ff4\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-icon-default"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.2-milestone-1"
      }, {
        "fixed" : "14.10.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-icon-script"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.2-milestone-1"
      }, {
        "fixed" : "14.10.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-icon-script"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0-rc-1"
      }, {
        "fixed" : "15.2-rc-1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-icon-default"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0-rc-1"
      }, {
        "fixed" : "15.2-rc-1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-icon-ui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.2-milestone-1"
      }, {
        "fixed" : "14.10.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-icon-ui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0-rc-1"
      }, {
        "fixed" : "15.2-rc-1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-fm68-j7ww-h9xf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-36470"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/commit/46b542854978e9caa687a5c2b8817b8b17877d94"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/commit/79418dd92ca11941b46987ef881bf50424898ff4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/commit/b0cdfd893912baaa053d106a92e39fa1858843c7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xwiki/xwiki-platform"
  }, {
    "type" : "WEB",
    "url" : "https://jira.xwiki.org/browse/XWIKI-20524"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-30T20:41:57Z",
    "nvd_published_at" : "2023-06-29T21:15:09Z"
  }
}