Skip to content

Dependency verification: Usage of long IDs for PGP keys is unsafe and is subject to collision attacks

Moderate
ljacomet published GHSA-c724-3xg7-g3hf Feb 28, 2023

Package

Gradle (Java)

Affected versions

6.2 to 7.6

Patched versions

6.9.4, 7.6.1, 8.0

Description

Impact

This is a collision attack on long IDs (64bits) for PGP keys.

Users of dependency verification in Gradle are vulnerable if they use long IDs for PGP keys in a trusted-key or pgp element in their dependency verification metadata file.

Patches

The fix is to fail dependency verification if anything but a fingerprint is used in a trust element in dependency verification metadata.

The problem is fixed in Gradle 8.0 and above. The problem is also patched in Gradle 6.9.4 and 7.6.1.

Workarounds

Using only full fingerprint IDs for trusted-key or pgp element in the metadata is a protection against this issue.

References

Questions?

  • For security related issues, please email us at [email protected].
  • For non-security related issues, please open an issue on GitHub.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2023-26053

Weaknesses

Inclusion of Functionality from Untrusted Control Sphere

The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere. Learn more on MITRE.

Credits