Description
XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Improper escaping in the document `SkinsCode.XWikiSkinsSheet` leads to an injection vector from view right on that document to programming rights, or in other words, it is possible to execute arbitrary script macros including Groovy and Python macros that allow remote code execution including unrestricted read and write access to all wiki contents. The attack works by opening a non-existing page with a name crafted to contain a dangerous payload. It is possible to check if an existing installation is vulnerable. See the linked GHSA for instructions on testing an installation. This issue has been patched in XWiki 14.4.8, 14.10.4 and 15.0-rc-1. Users are advised to upgrade. The fix commit `d9c88ddc` can also be applied manually to the impacted document `SkinsCode.XWikiSkinsSheet` and users unable to upgrade are advised to manually patch their installations.
Remediation
References
https://github.com/xwiki/xwiki-platform/commit/d9c88ddc4c0c78fa534bd33237e95dea66003d29
https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-h4vp-69r8-gvjg
https://jira.xwiki.org/browse/XWIKI-20457
Related Vulnerabilities
CVE-2023-40027 Vulnerability in npm package @keystone-6/core
CVE-2023-44487 Vulnerability in maven package org.apache.tomcat.embed:tomcat-embed-core
CVE-2016-1000345 Vulnerability in maven package org.bouncycastle:bcprov-jdk15on
CVE-2022-3510 Vulnerability in maven package com.google.protobuf:protobuf-java
CVE-2021-37137 Vulnerability in maven package io.netty:netty-codec