CVE-2022-24898: Xwiki commons xml Xwiki-commons-xml Vulnerability
MODERATECVE-2022-24898 is a MODERATE (CVSS 4.9) xwiki-commons-xml vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Xwiki commons xml libraries in the Maven ecosystem. The issue involves xwiki-commons-xml. Remediation is available by upgrading affected packages to version 12.10.10, 13.4.4, 13.8-rc-1.
CVE-2022-24898 at a Glance
Security Impact
CVSS: 4.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2022-24898
To remediate this vulnerability, upgrade all affected Xwiki commons xml 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-xml</artifactId>
<version>12.10.10</version>
</dependency>
<dependency>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-xml</artifactId>
<version>13.4.4</version>
</dependency>
<dependency>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-xml</artifactId>
<version>13.8-rc-1</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-2022-24898, 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 xml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.10.10), 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-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Xwiki commons xml, 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-2022-24898 Affected Xwiki commons xml Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.xwiki.commons:xwiki-commons-xml
|
Maven |
≥ 2.7
< 12.10.10
|
12.10.10
|
|
org.xwiki.commons:xwiki-commons-xml
|
Maven |
≥ 13.0.0
< 13.4.4
|
13.4.4
|
|
org.xwiki.commons:xwiki-commons-xml
|
Maven |
≥ 13.5-rc-1
< 13.8-rc-1
|
13.8-rc-1
|
References
Frequently Asked Questions
What is CVE-2022-24898?
Which Xwiki commons xml versions are affected?
What version fixes CVE-2022-24898?
Is xwiki-commons-xml affected?
What is the CVSS score of CVE-2022-24898?
What CWE is associated with CVE-2022-24898?
How can I check Maven dependencies for CVE-2022-24898?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m2r5-4w96-qxg5",
"modified" : "2022-04-28T19:31:55Z",
"published" : "2022-04-28T19:31:55Z",
"aliases" : [ "CVE-2022-24898" ],
"summary" : "Arbitrary file access through XML parsing in org.xwiki.commons:xwiki-commons-xml",
"details" : "### Impact\n\nIt's possible in a script to access any file accessing to the user running XWiki application server with XML External Entity Injection through the XML script service.\n\nFor example:\n\n```\n{{velocity}}\n#set($xml=$services.get('xml'))\n#set($xxe_payload = \"<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE root[<!ENTITY xxe SYSTEM 'file:///etc/passwd' >]><root><foo>&xxe;</foo></root>\")\n#set($doc=$xml.parse($xxe_payload))\n$xml.serialize($doc)\n{{/velocity}}\n```\n\n### Patches\n\nThe problem has been patched on versions 12.10.10, 13.4.4 and 13.8RC1.\n\n### Workarounds\n\nThere's no easy workaround for fixing this vulnerability other than upgrading and being careful when giving Script rights.\n\n### References\n\nhttps://jira.xwiki.org/browse/XWIKI-18946\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 [XWiki Security mailing-list](mailto:security@xwiki.org)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.commons:xwiki-commons-xml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.7"
}, {
"fixed" : "12.10.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.commons:xwiki-commons-xml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "13.0.0"
}, {
"fixed" : "13.4.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.commons:xwiki-commons-xml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "13.5-rc-1"
}, {
"fixed" : "13.8-rc-1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 13.7"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-commons/security/advisories/GHSA-m2r5-4w96-qxg5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24898"
}, {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-commons/commit/947e8921ebd95462d5a7928f397dd1b64f77c7d5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/xwiki/xwiki-commons"
}, {
"type" : "WEB",
"url" : "https://jira.xwiki.org/browse/XWIKI-18946"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-04-28T19:31:55Z",
"nvd_published_at" : "2022-04-28T20:15:00Z"
}
}