CVE-2021-21379: Xwiki platform rendering wikimacro store It's Possible To Execute Anything Vulnerability
LOWCVE-2021-21379 is a LOW it's possible to execute anything vulnerability (CWE-281: Improper Preservation of Permissions) affecting Xwiki platform rendering wikimacro store libraries in the Maven ecosystem. The issue involves it's possible to execute anything with the rights of the author of a macro which uses the {{wikimacrocontent}} macro. Remediation is available by upgrading affected packages to version 11.10.11, 12.6.3, 12.8.
CVE-2021-21379 at a Glance
How to Fix CVE-2021-21379
To remediate this vulnerability, upgrade all affected Xwiki platform rendering wikimacro store dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-rendering-wikimacro-store</artifactId>
<version>11.10.11</version>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-rendering-wikimacro-store</artifactId>
<version>12.6.3</version>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-rendering-wikimacro-store</artifactId>
<version>12.8</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.xwiki.platform
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-21379, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.xwiki.platform
Analyze the terminal output to locate any version of Xwiki platform rendering wikimacro store in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.10.11), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.xwiki.platform command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-281: Improper Preservation of Permissions, where the product does not preserve permissions or incorrectly preserves permissions when copying, restoring, or sharing objects, which can cause them to have less restrictive permissions than intended. In Xwiki platform rendering wikimacro store, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-21379 Affected Xwiki platform rendering wikimacro store Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.xwiki.platform:xwiki-platform-rendering-wikimacro-store
|
Maven |
≥ 11.4
< 11.10.11
|
11.10.11
|
|
org.xwiki.platform:xwiki-platform-rendering-wikimacro-store
|
Maven |
≥ 12.0
< 12.6.3
|
12.6.3
|
|
org.xwiki.platform:xwiki-platform-rendering-wikimacro-store
|
Maven |
≥ 12.7
< 12.8
|
12.8
|
References
Frequently Asked Questions
What is CVE-2021-21379?
Which Xwiki platform rendering wikimacro store versions are affected?
What version fixes CVE-2021-21379?
Is xwiki-platform-rendering-wikimacro-store affected?
What CWE is associated with CVE-2021-21379?
How can I check Maven dependencies for CVE-2021-21379?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v662-xpcc-9xf6",
"modified" : "2021-03-23T22:24:20Z",
"published" : "2021-03-23T22:47:26Z",
"aliases" : [ "CVE-2021-21379" ],
"summary" : "It's possible to execute anything with the rights of the author of a macro which uses the {{wikimacrocontent}} macro",
"details" : "### Impact\n\nThe `{{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).\n\nFortunately, no such macro exists by default in XWiki Standard but one could have been created or installed with an extension.\n\n### Patches\n\nIt has been patched in versions XWiki 12.6.3, 11.10.11 and 12.8-rc-1.\n\n### Workarounds\n\nThere is no easy workaround other than disabling the affected macros.\nInserting content in a safe way or knowing what is the user who called the wiki macro is not easy.\n\n### References\n\nhttps://jira.xwiki.org/browse/XWIKI-17759\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki](https://jira.xwiki.org)\n* Email us at [our security mailing list](mailto:security@xwiki.org)",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.platform:xwiki-platform-rendering-wikimacro-store"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.4"
}, {
"fixed" : "11.10.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.platform:xwiki-platform-rendering-wikimacro-store"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "12.0"
}, {
"fixed" : "12.6.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.platform:xwiki-platform-rendering-wikimacro-store"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "12.7"
}, {
"fixed" : "12.8"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 12.7.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-v662-xpcc-9xf6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-21379"
}, {
"type" : "WEB",
"url" : "https://jira.xwiki.org/browse/XWIKI-17759"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-281" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2021-03-23T22:24:20Z",
"nvd_published_at" : "2021-03-12T18:15:00Z"
}
}