Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS0zNjMzLTVoODItMzlwcc4AAu1W

Go-tuf Improperly handles multiple key IDs for the same public keys in attacker-controlled metadata

Issue

If an attacker is able to control a threshold of keys to insert the same public key more than once with different key IDs into signed, trusted metadata on a TUF repository, then go-tuf clients < 0.3.2 are susceptible to an attack where attackers can cause the same signature from the same public key to be counted more than once against the threshold of signatures because they were mistakenly distinguished due to having different key IDs.

For example, suppose that in the root metadata file, there were a threshold of 2 self-signatures required from 2 different keys KA and KB belonging to Alice and Bob respectively. Bob has either mistakenly or maliciously produced a signed a malicious version of the root metadata file where Alice's key is listed once with the keyid SHA2256KA, but his public key is listed twice, once with the keyid SHA2256KB, and the other with SHA2512KB. If Bob can convince Alice to mistakenly sign this root metadata file without noticing this error, then clients < 0.3.2 would mistakenly count the same signature from Bob twice, once with the keyid SHA2256KB, and the other with SHA2512KB.

Impact

While the impact is potentially high, the severity is low as it requires either attackers or the repository (deliberately or mistakenly respectively) to have produced such an incorrect distribution of public keys, causing clients < 0.3.2 to fall prey to this issue.

Patches

A fix is available for clients with versions >= 0.3.2.

Workarounds

Users can work around this vulnerability in previous clients by checking for and removing duplicate public keys with different key IDs (e.g., SHA2-256 and SHA2-512 hashes of the same public key) in all signed metadata on their TUF repositories.

References

For more information

If you have any questions or comments about this advisory:

Permalink: https://github.com/advisories/GHSA-3633-5h82-39pq
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS0zNjMzLTVoODItMzlwcc4AAu1W
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Low
Classification: General
Published: over 1 year ago
Updated: 8 months ago


Identifiers: GHSA-3633-5h82-39pq
References: Repository: https://github.com/theupdateframework/go-tuf
Blast Radius: 0.0

Affected Packages

go:github.com/theupdateframework/go-tuf
Dependent packages: 650
Dependent repositories: 1,148
Downloads:
Affected Version Ranges: < 0.3.2
Fixed in: 0.3.2
All affected versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10, 0.1.11, 0.1.12, 0.1.13, 0.1.14, 0.1.15, 0.2.0, 0.3.0, 0.3.1
All unaffected versions: 0.3.2, 0.4.0, 0.5.0, 0.5.1, 0.5.2, 0.6.0, 0.6.1, 0.7.0