Loading...
Skip to main content

CVE-2024-31996 — XWiki Commons missing escaping of `{` in...

CRITICAL

XWiki Commons missing escaping of `{` in Velocity escapetool allows remote code execution

Published April 10, 2024Updated September 10, 2026Source: osv

Summary

### Impact The HTML escaping of escaping tool that is used in XWiki doesn't escape `{`, which, when used in certain places, allows XWiki syntax injection and thereby remote code execution. To reproduce in an XWiki installation, open `<xwiki-host>/xwiki/bin/view/Panels/PanelLayoutUpdate?place=%7B%7B%2Fhtml%7D%7D%7B%7Basync%20async%3Dfalse%7D%7D%7B%7Bvelocity%7D%7D%23evaluate(%24request.eval)%7B%7B%2Fvelocity%7D%7D%7B%7B%2Fasync%7D%7D&eval=Hello%20from%20URL%20Parameter!%20I%20got%20programming%3A%20%24services.security.authorization.hasAccess(%27programming%27)` where `<xwiki-host>` is the URL of your XWiki installation. If this displays `You are not admin on this place Hello from URL Parameter! I got programming: true`, the installation is vulnerable. ### Patches The vulnerability has been fixed on XWiki 14.10.19, 15.5.5, and 15.9 RC1. ### Workarounds Apart from upgrading, there is no generic workaround. However, replacing `$escapetool.html` by `$escapetool.xml` in XWiki documents fixes the vulnerability. In a standard XWiki installation, we're only aware of the document `Panels.PanelLayoutUpdate` that exposes this vulnerability, patching this document is thus a workaround. Any extension could expose this vulnerability and might thus require patching, too. ### References - https://github.com/xwiki/xwiki-commons/commit/b94142e2a66ec32e89eacab67c3da8d91f5ef93a - https://jira.xwiki.org/browse/XCOMMONS-2828 - https://jira.xwiki.org/browse/XWIKI-21438

Advisory Timeline

  • First published April 10, 2024 (915 days ago).
  • Last revised September 10, 2026 — 882 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Maven
Update org.xwiki.commons:xwiki-commons-velocity to 14.10.19 or later
<!-- Update pom.xml dependency version to 14.10.19 for org.xwiki.commons:xwiki-commons-velocity -->
Maven
Update org.xwiki.commons:xwiki-commons-velocity to 15.5.4 or later
<!-- Update pom.xml dependency version to 15.5.4 for org.xwiki.commons:xwiki-commons-velocity -->
Maven
Update org.xwiki.commons:xwiki-commons-velocity to 15.9-rc-1 or later
<!-- Update pom.xml dependency version to 15.9-rc-1 for org.xwiki.commons:xwiki-commons-velocity -->

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 1 ecosystem: maven (1).

PackageEcosystemAffectedFixed In
org.xwiki.commons:xwiki-commons-velocity
maven
10.0, 10.1, 10.1-rc-1, 10.10 (+416 more)14.10.19
org.xwiki.commons:xwiki-commons-velocity
maven
15.0, 15.0-rc-1, 15.1, 15.1-rc-1 (+11 more)15.5.4
org.xwiki.commons:xwiki-commons-velocity
maven
15.6, 15.6-rc-1, 15.7, 15.7-rc-1 (+2 more)15.9-rc-1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2024-31996?
XWiki Commons missing escaping of `{` in Velocity escapetool allows remote code execution This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
How do I check if my project is affected by CVE-2024-31996?
CVE-2024-31996 affects org.xwiki.commons:xwiki-commons-velocity. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-31996 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
10.0

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-hf43-47q4-fhq5

Related CVEs

  • CVE-2026-107726
    CRITICAL

    Hazelcast allows arbitrary member memory access by low-privileged client

  • CVE-2023-26055
    CRITICAL

    XWiki Platform may allow privilege escalation to programming rights via user's first name

  • CVE-2026-107282
    CRITICAL

    AsyncHttpClient: Replay to a different host sends the original host request and credentials to the new host

  • CVE-2026-23734
    CRITICAL

    XWiki Platform has path traversal via resources parameter in ssx and jsx endpoints when using leading slash

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies