CVE-2024-31987
JSON

10.0critical

XWiki Platform remote code execution from account via custom skins support

Severity
10.0critical CVSS:3.1 by GitHub_M
Exploit likelihood
1.45% (higher than 74% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-cv55-v6rw-7r5v

Description

XWiki Platform is a generic wiki platform. Starting in version 6.4-milestone-1 and prior to versions 4.10.19, 15.5.4, and 15.10-rc-1, any user who can edit any page like their profile can create a custom skin with a template override that is executed with programming right, thus allowing remote code execution. This has been patched in XWiki 14.10.19, 15.5.4 and 15.10RC1. No known workarounds are available except for upgrading.

Affected

Product or packageVersionsReported by
xwiki xwiki-platform>= 6.4-milestone-1, < 14.10.19, >= 15.0-rc-1, < 15.5.4, >= 15.6-rc-1, < 15.10-rc-1, from 6.4-milestone-1 before 14.10.19, from 15.0-rc-1 before 15.5.4, from 15.6-rc-1 before 15.10-rc-1CVE List
org.xwiki.platform:xwiki-platform-oldcore (Maven)from 6.4-milestone-1 before 14.10.19, from 15.0-rc-1 before 15.5.4, from 15.6-rc-1 before 15.10-rc-1GitHub Advisory Database
xwiki xwikifrom 6.4 before 14.10.19, from 15.0 before 15.5.4, from 15.6 before 15.10NVD

All scores

GitHub_M10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-862

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

XWiki Platform is a generic wiki platform. Starting in version 6.4-milestone-1 and prior to versions 4.10.19, 15.5.4, and 15.10-rc-1, any user who can edit any page like their profile can create a custom skin with a template override that is executed with programming right, thus allowing remote code execution. This has been patched in XWiki 14.10.19, 15.5.4 and 15.10RC1. No known workarounds are available except for upgrading.

GitHub Advisory Database
Impact

Any user who can edit any page like their profile can create a custom skin with a template override that is executed with programming right, thus allowing remote code execution.

To reproduce, as a user without edit, script or admin right, add an object of class XWiki.XWikiSkins to your profile. Name it whatever you want and set the Base Skin to flamingo. Add an object of class XWikiSkinFileOverrideClass and set the path to macros.vm and the content to:

#macro(mediumUserAvatar $username)
  #resizedUserAvatar($username 50)
  $services.logging.getLogger('Skin').error("I got programming: $services.security.authorization.hasAccess('programming')")
#end

Back to your profile, click Test this skin. Force a refresh, just in case. If the error "Skin - I got programming: true" gets logged, the installation is vulnerable.

Patches

This has been patched in XWiki 14.10.19, 15.5.4 and 15.10RC1.

Workarounds

We're not aware of any workaround except upgrading.

References
NVD (es)

XWiki Platform es una plataforma wiki genérica. A partir de la versión 6.4-milestone-1 y antes de las versiones 4.10.19, 15.5.4 y 15.10-rc-1, cualquier usuario que pueda editar cualquier página como su perfil puede crear una máscara personalizada con una anulación de plantilla que se ejecuta con derecho de programación, permitiendo así la ejecución remota de código. Esto ha sido parcheado en XWiki 14.10.19, 15.5.4 y 15.10RC1. No hay workarounds disponibles excepto la actualización.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-31987 changed 2024-08-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-cv55-v6rw-7r5v changed 2026-09-10CC-BY-4.0
NVDCVE-2024-31987 changed 2026-06-17Public domain