CVE-2019-16370: Gradle core Use Of A Weak Cryptographic Vulnerability
LOWCVE-2019-16370 is a LOW use of a weak cryptographic vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Gradle core libraries in the Maven ecosystem. The issue involves use of a weak cryptographic algorithm in gradle. Remediation is available by upgrading affected packages to version 6.0.
CVE-2019-16370 at a Glance
How to Fix CVE-2019-16370
To remediate this vulnerability, upgrade all affected Gradle 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.gradle</groupId>
<artifactId>gradle-core</artifactId>
<version>6.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=org.gradle
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2019-16370, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.gradle
Analyze the terminal output to locate any version of Gradle core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.gradle 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-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Gradle 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-2019-16370 Affected Gradle core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.gradle:gradle-core
|
Maven |
< 6.0
|
6.0
|
References
Frequently Asked Questions
What is CVE-2019-16370?
Which Gradle core versions are affected?
What version fixes CVE-2019-16370?
Is gradle-core affected?
What CWE is associated with CVE-2019-16370?
How can I check Maven dependencies for CVE-2019-16370?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hhr2-f668-ff2w",
"modified" : "2022-11-01T23:37:01Z",
"published" : "2022-05-24T16:56:18Z",
"aliases" : [ "CVE-2019-16370" ],
"summary" : "Use of a weak cryptographic algorithm in Gradle",
"details" : "The PGP signing plugin in Gradle before 6.0 relies on the SHA-1 algorithm, which might allow an attacker to replace an artifact with a different one that has the same SHA-1 message digest, a related issue to CVE-2005-4900.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.gradle:gradle-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-16370"
}, {
"type" : "WEB",
"url" : "https://github.com/gradle/gradle/pull/10543"
}, {
"type" : "WEB",
"url" : "https://github.com/gradle/gradle/commit/425b2b7a50cd84106a77cdf1ab665c89c6b14d2f"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-327" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-01T23:37:01Z",
"nvd_published_at" : "2019-09-16T18:15:00Z"
}
}