LiveActive security incident?Get immediate response
CVE Record

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.

MediumCVSS 6.6Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

Gradle’s dependency verification could silently trust an external dependency when expected signature verification cannot happen and no checksum is present. Affected builds may accept a malicious or wrong artifact instead of failing. The issue matters most where builds pull dependencies from public or untrusted repositories, especially with name-squatting risk or HTTP-only dependency downloads.

Executive priority

Treat as a moderate build-chain integrity risk. Prioritize projects that produce production software, consume public dependencies, or still use HTTP repositories. Remediation is straightforward if teams can upgrade Gradle or clean verification metadata.

Technical view

In Gradle 6.2 through 7.4.2, verification metadata containing gpg entries without checksum entries could cause verification to be skipped. If signature validation was disabled, or enabled but the remote repository lacked a signature file, Gradle accepted the artifact. Gradle 7.5 changes behavior to run checksum verification when signature verification cannot complete.

Likely exposure

Exposure is limited to projects using Gradle 6.2 through 7.4.2 with dependency verification metadata that has gpg entries without checksums, especially where signature files are absent or signature validation is disabled.

Exploitation context

The sources do not report active exploitation, and this CVE is not marked KEV. Practical abuse requires a vulnerable build configuration plus an opportunity to supply or substitute a dependency, such as name squatting or insecure HTTP dependency retrieval.

Researcher notes

This is CWE-829 behavior in dependency trust handling, not a runtime application flaw. The vulnerable condition depends on verification metadata shape and repository signature availability. Evidence supports patched behavior in Gradle 7.5 and two metadata workarounds; no exploit activity is cited.

Mitigation direction

  • Upgrade affected builds to Gradle 7.5 or later.
  • Remove gpg elements when signature validation is disabled.
  • Avoid gpg entries for dependencies that do not publish signature files.
  • Prefer HTTPS repositories for dependency retrieval.
  • Check current Gradle advisory for any later guidance.

Validation and detection

  • Inventory build environments for Gradle versions 6.2 through 7.4.2.
  • Review dependency verification metadata for gpg entries without checksum entries.
  • Identify dependencies whose remote repositories do not publish signature files.
  • Check whether signature validation is disabled in affected builds.
  • Confirm builds use HTTPS repositories where external dependencies are downloaded.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-829: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31156 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.6 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.6CVSS 3.1MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H0.75.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6.6Medium
CVSS 3.1 vector shape for CVE-2022-31156Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
gradlegradle>= 6.2, <= 7.4.2Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-829 · source CWE mapping

Inclusion of Functionality from Untrusted Control Sphere

Inclusion of Functionality from Untrusted Control Sphere represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.