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
- https://github.com/xwiki/xwiki-commons/commit/b94142e2a66ec32e89eacab67c3da8d91f5ef93a
- https://jira.xwiki.org/browse/XCOMMONS-2828
- https://jira.xwiki.org/browse/XWIKI-21438
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1oZjQzLTQ3cTQtZmhxNc4AA63z
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: 9 months ago
Updated: 5 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
EPSS Percentage: 0.00297
EPSS Percentile: 0.69117
Identifiers: GHSA-hf43-47q4-fhq5, CVE-2024-31996
References:
- https://github.com/xwiki/xwiki-commons/security/advisories/GHSA-hf43-47q4-fhq5
- https://github.com/xwiki/xwiki-commons/commit/b0805160ec7b01ee12417e79cb384e60ae4817aa
- https://github.com/xwiki/xwiki-commons/commit/b94142e2a66ec32e89eacab67c3da8d91f5ef93a
- https://github.com/xwiki/xwiki-commons/commit/ed7ff515a2436a1c6dcbd0c6ca0c41e434d58915
- https://jira.xwiki.org/browse/XCOMMONS-2828
- https://jira.xwiki.org/browse/XWIKI-21438
- https://nvd.nist.gov/vuln/detail/CVE-2024-31996
- https://github.com/advisories/GHSA-hf43-47q4-fhq5
Blast Radius: 18.1
Affected Packages
maven:org.xwiki.commons:xwiki-commons-velocity
Dependent packages: 3Dependent 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, 15.10.9, 15.10.10, 15.10.11, 15.10.12, 15.10.13, 15.10.14, 15.10.15, 16.0.0, 16.1.0, 16.2.0, 16.3.0, 16.3.1, 16.4.0, 16.4.1, 16.4.2, 16.4.3, 16.4.4, 16.4.5, 16.4.6, 16.5.0, 16.6.0, 16.7.0, 16.7.1, 16.8.0, 16.9.0, 16.10.0, 16.10.1, 16.10.2
All unaffected versions: