Vulnerabilities in pkg:maven/io.gitlab.arturbosch.detekt/detekt-core
PACKAGECVE-2022-0272 is a HIGH (CVSS 7.3) xml external entity reference vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Detekt core libraries in the Maven ecosystem. The issue involves xml external entity reference in detekt. Remediation is available by upgrading affected packages to version 1.20.0.
pkg:maven/io.gitlab.arturbosch.detekt/detekt-core
Vulnerability advisories affecting package pkg:maven/io.gitlab.arturbosch.detekt/detekt-core. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-2cfc-865j-gm4w | CVE-2022-0272 | HIGH | XML External Entity Reference in detekt |
CVE-2022-0272 at a Glance
Security Impact
CVSS: 7.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2022-0272
To remediate this vulnerability, upgrade all affected Detekt 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>io.gitlab.arturbosch.detekt</groupId>
<artifactId>detekt-core</artifactId>
<version>1.20.0</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=io.gitlab.arturbosch.detekt
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2022-0272, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=io.gitlab.arturbosch.detekt
Analyze the terminal output to locate any version of Detekt core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.20.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=io.gitlab.arturbosch.detekt 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 Detekt 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-2022-0272 Affected Detekt core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.gitlab.arturbosch.detekt:detekt-core
|
Maven |
< 1.20.0
|
1.20.0
|
References
Frequently Asked Questions
What is CVE-2022-0272?
Which Detekt core versions are affected?
What version fixes CVE-2022-0272?
Is detekt-core affected?
What is the CVSS score of CVE-2022-0272?
What CWE is associated with CVE-2022-0272?
How can I check Maven dependencies for CVE-2022-0272?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2cfc-865j-gm4w",
"modified" : "2022-04-26T13:03:16Z",
"published" : "2022-04-22T00:00:36Z",
"aliases" : [ "CVE-2022-0272" ],
"summary" : "XML External Entity Reference in detekt",
"details" : "Improper Restriction of XML External Entity Reference in GitHub repository detekt/detekt prior to 1.20.0.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.gitlab.arturbosch.detekt:detekt-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.20.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-0272"
}, {
"type" : "WEB",
"url" : "https://github.com/detekt/detekt/commit/c965a8d2a6bbdb9bcfc6acfa7bbffd3da81f5395"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/detekt/detekt"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/23e37ba7-96d5-4037-a90a-8c8f4a70ce44"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-04-26T13:03:16Z",
"nvd_published_at" : "2022-04-21T17:15:00Z"
}
}