CVE-2021-32621: Xwiki commons core Script Injection Without Script Or Vulnerability
HIGHCVE-2021-32621 is a HIGH (CVSS 8.8) script injection without script or vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Xwiki commons core libraries in the Maven ecosystem. The issue involves script injection without script or programming rights through gadget titles. Remediation is available by upgrading affected packages to version 12.6.7, 12.10.3.
CVE-2021-32621 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2021-32621
To remediate this vulnerability, upgrade all affected Xwiki commons core 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.commons</groupId>
<artifactId>xwiki-commons-core</artifactId>
<version>12.6.7</version>
</dependency>
<dependency>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-core</artifactId>
<version>12.10.3</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.commons
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-32621, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.xwiki.commons
Analyze the terminal output to locate any version of Xwiki commons core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.6.7), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.xwiki.commons 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Xwiki commons core, 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-32621 Affected Xwiki commons core Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.xwiki.commons:xwiki-commons-core
|
Maven |
< 12.6.7
|
12.6.7
|
|
org.xwiki.commons:xwiki-commons-core
|
Maven |
≥ 12.10.0
< 12.10.3
|
12.10.3
|
References
Frequently Asked Questions
What is CVE-2021-32621?
Which Xwiki commons core versions are affected?
What version fixes CVE-2021-32621?
Is xwiki-commons-core affected?
What is the CVSS score of CVE-2021-32621?
What CWE is associated with CVE-2021-32621?
How can I check Maven dependencies for CVE-2021-32621?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h353-hc43-95vc",
"modified" : "2023-09-29T20:11:43Z",
"published" : "2021-05-18T18:36:16Z",
"aliases" : [ "CVE-2021-32621" ],
"summary" : "Script injection without script or programming rights through Gadget titles",
"details" : "### Impact\nA user without Script or Programming right is able to execute script requiring privileges by editing gadget titles in the dashboard.\n\n### Patches\nThe issue has been patched in XWiki 12.6.7, 12.10.3 and 13.0RC1.\n\n### Workarounds\nThere's no easy workaround for this issue, it is recommended to upgrade XWiki.\n\n### References\nhttps://jira.xwiki.org/browse/XWIKI-17794\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [JIRA](https://jira.xwiki.org)\n* Email us at [XWiki security mailing-list](mailto:security@xwiki.org)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.commons:xwiki-commons-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "12.6.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.commons:xwiki-commons-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "12.10.0"
}, {
"fixed" : "12.10.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-h353-hc43-95vc"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32621"
}, {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-platform/commit/bb7068bd911f91e5511f3cfb03276c7ac81100bc"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/xwiki/xwiki-platform"
}, {
"type" : "WEB",
"url" : "https://jay-from-future.github.io/cve/2021/06/17/xwiki-rce-cve.html"
}, {
"type" : "WEB",
"url" : "https://jira.xwiki.org/browse/XWIKI-17794"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-18T16:46:49Z",
"nvd_published_at" : "2021-05-28T21:15:00Z"
}
}