BreachSpiderVerified, not vibes

CVE-2022-31156 in Gradle

Medium 4.4

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 acc...

Affects 1 product from 1 vendor. Facts below cite their sources.

CVSS 3.14.4
EPSS0.5%
EPSS percentile39th
FixSee advisory

Remotely exploitable over the network, high complexity, high privileges required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact, full integrity impact, no availability impact.

Affected products and versions

VendorProductAffected versions
Gradle Gradle ≥ 6.2.0, < 7.5.0

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

View Vendor Advisory →

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2022-31156
BreachSpider IDBS-2022-GLOBAL-067168-M
CVSS vectorCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:H/A:N
Published2022-07-14
Last modified2026-06-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-347: CWE-347

CWE-829: CWE-829

Related attack patterns (CAPEC)

CAPEC-201 Serialized Data External Linking via CWE-829

CAPEC-228 DTD Injection via CWE-829

CAPEC-252 PHP Local File Inclusion via CWE-829

CAPEC-263 Force Use of Corrupted Files via CWE-829

CAPEC-463 Padding Oracle Crypto Attack via CWE-347

Show all 15

CAPEC-475 Signature Spoofing by Improper Validation via CWE-347

CAPEC-538 Open-Source Library Manipulation via CWE-829

CAPEC-640 Inclusion of Code in Existing Process via CWE-829

CAPEC-660 Root/Jailbreak Detection Evasion via Hooking via CWE-829

CAPEC-695 Repo Jacking via CWE-829

CAPEC-698 Install Malicious Extension via CWE-829

CAPEC-251 Local Code Inclusion via CWE-829

CAPEC-253 Remote Code Inclusion via CWE-829

CAPEC-175 Code Inclusion via CWE-829

CAPEC-549 Local Execution of Code via CWE-829

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

CVE-2022-31156 affects Gradle versions 6.2 through 7.4.2, where the dependency verification feature may skip validation, allowing untrusted external dependencies.

An attacker could exploit this vulnerability by providing a malicious dependency that bypasses the intended security checks, potentially leading to the execution of arbitrary code or other malicious activities.

Questions

What is CVE-2022-31156?

CVE-2022-31156 affects Gradle versions 6.2 through 7.4.2, where the dependency verification feature may skip validation, allowing untrusted external dependencies.

What is the CVSS score for CVE-2022-31156?

CVE-2022-31156 has CVSS 4.4 (Medium). Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:H/A:N. EPSS: 0.5%.

Is CVE-2022-31156 actively exploited?

No confirmed active exploitation of CVE-2022-31156 as of 2026-09-25.

How do I remediate CVE-2022-31156?

Priority: MEDIUM. Advisory: https://docs.gradle.org/7.5/release-notes.html

What systems are affected by CVE-2022-31156?

CVE-2022-31156 affects Gradle Gradle.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Gradle","product":"Gradle","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.