CVE-2020-2172: Code coverage api XXE Vulnerability Vulnerability
HIGHCVE-2020-2172 is a HIGH (CVSS 7.1) xxe vulnerability vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) affecting Code coverage api libraries in the Maven ecosystem. The issue involves xxe vulnerability in jenkins code coverage api plugin. Remediation is available by upgrading affected packages to version 1.1.5.
CVE-2020-2172 at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N).
How to Fix CVE-2020-2172
To remediate this vulnerability, upgrade all affected Code coverage api 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.jenkins.plugins</groupId>
<artifactId>code-coverage-api</artifactId>
<version>1.1.5</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.jenkins.plugins
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2020-2172, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=io.jenkins.plugins
Analyze the terminal output to locate any version of Code coverage api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.5), your application is affected.
Note: The mvn dependency:tree -Dincludes=io.jenkins.plugins 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-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), where the product uses xml documents and allows their structure to be defined with a document type definition (dtd), but it does not properly control the number of recursive definitions of entities. In Code coverage api, 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-2020-2172 Affected Code coverage api Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.jenkins.plugins:code-coverage-api
|
Maven |
< 1.1.5
|
1.1.5
|
References
Frequently Asked Questions
What is CVE-2020-2172?
Which Code coverage api versions are affected?
What version fixes CVE-2020-2172?
Is code-coverage-api affected?
What is the CVSS score of CVE-2020-2172?
What CWE is associated with CVE-2020-2172?
How can I check Maven dependencies for CVE-2020-2172?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cmgm-q8hf-p7jc",
"modified" : "2022-12-20T14:35:40Z",
"published" : "2022-05-24T17:13:39Z",
"aliases" : [ "CVE-2020-2172" ],
"summary" : "XXE vulnerability in Jenkins Code Coverage API Plugin",
"details" : "Code Coverage API Plugin 1.1.4 and earlier does not configure its XML parser to prevent XML external entity (XXE) attacks. This allows a user able to control the input files for the \\\"Publish Coverage Report\\\" post-build step to have Jenkins parse a crafted file that uses external entities for extraction of secrets from the Jenkins controller or server-side request forgery.\n\nCode Coverage API Plugin 1.1.5 disables external entity resolution for its XML parser.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.jenkins.plugins:code-coverage-api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-2172"
}, {
"type" : "WEB",
"url" : "https://github.com/jenkinsci/code-coverage-api-plugin/commit/f0ef84c25f7bc4de4e722e994de57d238225834c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jenkinsci/code-coverage-api-plugin"
}, {
"type" : "WEB",
"url" : "https://jenkins.io/security/advisory/2020-04-07/#SECURITY-1699"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2020/04/07/3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611", "CWE-776" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-12-20T14:35:40Z",
"nvd_published_at" : "2020-04-07T13:15:00Z"
}
}