CVE-2022-31156 | Gradle's dependency verification can ignore checksum verification when signature verification cannot be performed

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.

Published: 2022-07-14 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-31156 is rated Moderate Risk (41.4/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.20%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-31156

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-07-15 0.05% 0.20% +0.15%
2 2023-07-21 0.05% 0.05% +0.01%
3 2023-03-07 0.05%

Full EPSS history (4 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-31156

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
6.6 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:H)
They need powerful rights—admin, root, or similar—before this pays off.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
0.7 5.9 [email protected]
4.4 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:H)
They need powerful rights—admin, root, or similar—before this pays off.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
0.7 3.6 [email protected]

Weakness enumeration for CVE-2022-31156

OS Trackers for CVE-2022-31156

vendor priority summary link
alpine medium CVE-2022-31156: 1 source package rows (gradle); 4 state rows across 2 repos (3.22-community, edge-community); fixed 0, open 4. https://security.alpinelinux.org/vuln/CVE-2022-31156
debian unimportant CVE-2022-31156 unimportant priority: Debian including 1 source packages (gradle), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2022-31156
redhat low https://access.redhat.com/security/cve/CVE-2022-31156
suse medium CVE-2022-31156 severity moderate: SUSE including 1 source package names (gradle), 11 product×package rows across 11 product lines (SUSE Enterprise Storage 7, SUSE Linux Enterprise High Performance Computing 15 SP2-ESPOS, … (11 product lines)): Known Not Affected 11. https://www.suse.com/security/cve/CVE-2022-31156/
ubuntu medium CVE-2022-31156 medium priority: Ubuntu including 1 source packages (gradle), 14 status rows across 14 suites (bionic, focal, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): ignored 7, needs-triage 7. https://ubuntu.com/security/CVE-2022-31156

Affected software / configurations for CVE-2022-31156

Vendor Product Version Raw CPE
gradle gradle >= 6.2.0, < 7.5.0 cpe:2.3:a:gradle:gradle:*:*:*:*:*:*:*:*

References for CVE-2022-31156

cvelogic Threat Intelligence