Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1oZjQzLTQ3cTQtZmhxNc4AA63z

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

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

Permalink: https://github.com/advisories/GHSA-hf43-47q4-fhq5
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1oZjQzLTQ3cTQtZmhxNc4AA63z
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: 23 days ago
Updated: 23 days ago


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

Identifiers: GHSA-hf43-47q4-fhq5, CVE-2024-31996
References: Repository: https://github.com/xwiki/xwiki-commons
Blast Radius: 18.1

Affected Packages

maven:org.xwiki.commons:xwiki-commons-velocity
Dependent packages: 3
Dependent repositories: 65
Downloads:
Affected Version Ranges: >= 15.6-rc-1, < 15.9-rc-1, >= 15.0-rc-1, < 15.5.4, >= 3.0.1, < 14.10.19
Fixed in: 15.9-rc-1, 15.5.4, 14.10.19
All affected versions: 12.10.11, 13.4.6, 13.4.7, 13.10.2, 13.10.3, 13.10.4, 13.10.5, 13.10.6, 13.10.7, 13.10.8, 13.10.9, 13.10.10, 13.10.11, 14.2.1, 14.3.1, 14.4.1, 14.4.2, 14.4.3, 14.4.4, 14.4.5, 14.4.6, 14.4.7, 14.4.8, 14.10.1, 14.10.2, 14.10.3, 14.10.4, 14.10.5, 14.10.6, 14.10.7, 14.10.8, 14.10.9, 14.10.10, 14.10.11, 14.10.12, 14.10.13, 14.10.14, 14.10.15, 14.10.16, 14.10.17, 14.10.18, 14.10.19, 14.10.20, 14.10.21, 15.5.1, 15.5.2, 15.5.3, 15.5.4, 15.5.5, 15.10.1, 15.10.2, 15.10.3, 15.10.4, 15.10.5, 15.10.6, 15.10.7, 15.10.8, 16.0.0, 16.1.0, 16.2.0
All unaffected versions: