Security Digest · Vulnerability record

CVE-2024-31996: XWiki Commons missing escaping of `{` in Velocity escapetool allows remote code execution

XWiki Platform is a generic wiki platform.

CVSS 10.0 Critical EPSS 2.1% · p82

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
  • EPSS 2.1%, percentile 82: FIRST’s model estimates a 2.1% chance of exploitation activity in the next 30 days, higher than 82% of all scored CVEs (elevated). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes org.xwiki.commons:xwiki-commons-velocity (Maven) >= 3.0.1, < 14.10.19, fixed in 14.10.19; org.xwiki.commons:xwiki-commons-velocity (Maven) >= 15.0-rc-1, < 15.5.4, fixed in 15.5.4; org.xwiki.commons:xwiki-commons-velocity (Maven) >= 15.6-rc-1, < 15.9-rc-1, fixed in 15.9-rc-1. Check your lockfile, including transitive dependencies.

What it is

XWiki Platform is a generic wiki platform. Starting in version 3.0.1 and prior to versions 4.10.19, 15.5.4, and 15.10-rc-1, 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. The vulnerability has been fixed in XWiki 14.10.19, 15.5.5, and 15.9 RC1. 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, the maintainers are 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.

From the GitHub advisory

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/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 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

Weakness type: CWE-95, CWE-94.

Product: org.xwiki.commons:xwiki-commons-velocity (Maven) · Assigned by: GitHub_M · Published: 2024-04-10

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
Mavenorg.xwiki.commons:xwiki-commons-velocity>= 3.0.1, < 14.10.1914.10.19
Mavenorg.xwiki.commons:xwiki-commons-velocity>= 15.0-rc-1, < 15.5.415.5.4
Mavenorg.xwiki.commons:xwiki-commons-velocity>= 15.6-rc-1, < 15.9-rc-115.9-rc-1
VendorProductAffected versions (per CVE record)
xwikixwiki-commons>= 3.0.1, < 14.10.19, >= 15.0-rc-1, < 15.5.4, >= 15.6-rc-1, < 15.9-rc-1

Severity scores

Scored byCVSSScoreVector
GitHub_M3.110 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
GitHub3.110.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Privileges required: none (no login)
  • User interaction: none
  • Scope: changed (can affect other components)

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation poc, automatable yes, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 2.10% probability of exploitation activity in the next 30 days; percentile 82.

Timeline

  • — CVE record published by GitHub_M
  • — GitHub-reviewed advisory GHSA-hf43-47q4-fhq5 published (critical)
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-hf43-47q4-fhq5 github.com
  2. CVE.org record CVE-2024-31996 cve.org
  3. NVD entry CVE-2024-31996 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. github.com github.com
  4. github.com github.com
  5. jira.xwiki.org jira.xwiki.org
  6. jira.xwiki.org jira.xwiki.org

Critical Maven advisories · Today’s Security Digest