6.6
MEDIUM
CVE-2022-31156
Apache Gradle Dependency Verification Weakness
Description

Gradle is a build tool. Dependency verification is a security feature in Gradle Build Tool that was introduced to allow validation of external dependencies either through their checksum or cryptographic signatures. In versions 6.2 through 7.4.2, there are some cases in which Gradle may skip that verification and accept a dependency that would otherwise fail the build as an untrusted external artifact. This can occur in two ways. When signature verification is disabled but the verification metadata contains entries for dependencies that only have a `gpg` element but no `checksum` element. When signature verification is enabled, the verification metadata contains entries for dependencies with a `gpg` element but there is no signature file on the remote repository. In both cases, the verification will accept the dependency, skipping signature verification and not complaining that the dependency has no checksum entry. For builds that are vulnerable, there are two risks. Gradle could download a malicious binary from a repository outside your organization due to name squatting. For those still using HTTP only and not HTTPS for downloading dependencies, the build could download a malicious library instead of the expected one. Gradle 7.5 patches this issue by making sure to run checksum verification if signature verification cannot be completed, whatever the reason. Two workarounds are available: Remove all `gpg` elements from dependency verification metadata if you disable signature validation and/or avoid adding `gpg` entries for dependencies that do not have signature files.

INFO

Published Date :

July 14, 2022, 8:15 p.m.

Last Modified :

July 24, 2023, 1:16 p.m.

Remotely Exploitable :

Yes !

Impact Score :

5.9

Exploitability Score :

0.7
Affected Products

The following products are affected by CVE-2022-31156 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Gradle gradle
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2022-31156.

URL Resource
https://docs.gradle.org/7.5/release-notes.html Release Notes Vendor Advisory
https://github.com/gradle/gradle/security/advisories/GHSA-j6wc-xfg8-jx2j Third Party Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2022-31156 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2022-31156 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Reanalysis by [email protected]

    Jul. 24, 2023

    Action Type Old Value New Value
    Removed CWE NIST CWE-829
    Added CWE NIST CWE-347
  • Initial Analysis by [email protected]

    Jul. 20, 2022

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:H/A:N
    Changed Reference Type https://docs.gradle.org/7.5/release-notes.html No Types Assigned https://docs.gradle.org/7.5/release-notes.html Release Notes, Vendor Advisory
    Changed Reference Type https://github.com/gradle/gradle/security/advisories/GHSA-j6wc-xfg8-jx2j No Types Assigned https://github.com/gradle/gradle/security/advisories/GHSA-j6wc-xfg8-jx2j Third Party Advisory
    Added CWE NIST CWE-829
    Added CPE Configuration OR *cpe:2.3:a:gradle:gradle:*:*:*:*:*:*:*:* versions from (including) 6.2.0 up to (excluding) 7.5.0
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2022-31156 is associated with the following CWEs:

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.05 }} 0.00%

score

0.20276

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability