Vulnerabilities in pkg:golang/github.com/theupdateframework/go-tuf

PACKAGE
Advisory Summary

GHSA-3633-5h82-39pq is a LOW go-tuf improperly handles multiple key vulnerability (CWE-289: Authentication Bypass by Alternate Name) affecting Github.com/theupdateframework/go tuf libraries in the Go ecosystem. The issue involves go-tuf improperly handles multiple key ids for the same public keys in attacker-controlled metadata. Remediation is available by upgrading affected packages to version 0.3.2.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/theupdateframework/go-tuf

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/theupdateframework/go-tuf. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-3633-5h82-39pq - LOW Go-tuf Improperly handles multiple key IDs for the same public keys in attacker-controlled metadata
GHSA-66x3-6cw3-v5gj CVE-2022-29173 HIGH Improper Validation of Integrity Check Value in go-tuf

GHSA-3633-5h82-39pq at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-3633-5h82-39pq
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-289: Authentication Bypass by Alternate Name
Affected Product Github.com/theupdateframework/go tuf
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-3633-5h82-39pq

To remediate this vulnerability, upgrade all affected Github.com/theupdateframework/go tuf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/theupdateframework/go-tuf fixed: 0.3.2
Upgrade github.com/theupdateframework/go-tuf to 0.3.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/theupdateframework/go-tuf

How to Check if You Are Affected

To determine whether your application is affected by GHSA-3633-5h82-39pq, inspect your project dependencies for Github.com/theupdateframework/go tuf:

inspect dependencies for github.com/theupdateframework/go-tuf

Analyze the terminal output to locate any version of Github.com/theupdateframework/go tuf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-289: Authentication Bypass by Alternate Name, where the product performs authentication based on the name of a resource being accessed, or the name of the actor performing the access, but it does not properly check all possible names for that resource or actor. In Github.com/theupdateframework/go tuf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/theupdateframework/go-tuf#client) < [0.3.2](https://github.com/theupdateframework/go-tuf/releases/tag/v0.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 $K_A$ and $K_B$ 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 $SHA2_{256}(K_A)$, but his public key is listed twice, once with the keyid $SHA2_{256}(K_B)$, and the other with $SHA2_{512}(K_B)$. 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 $SHA2_{256}(K_B)$, and the other with $SHA2_{512}(K_B)$. ### 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](https://github.com/theupdateframework/go-tuf/releases/tag/v0.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 * The PR fixing this issue is #369. * The [latest](https://theupdateframework.github.io/specification/v1.0.30/index.html#role-keyid) TUF specification advises using only SHA2-256 hashes of public keys. * Commit b383bafd27472310a650f3733e686163a868b71a removed support for clients generating multiple key IDs for the same public key. This commit is older than the first [v.0.1.0 tag](https://github.com/theupdateframework/go-tuf/releases/tag/v0.1.0) for go-tuf. * There is an outstanding [issue](https://github.com/theupdateframework/go-tuf/issues/368) for removing the non-standard `keyid_hash_algorithms` field in TUF metadata which arguably led to this issue. * A more robust solution is discussed (but not necessarily recommended) in [TAP 12](https://github.com/theupdateframework/taps/blob/master/tap12.md), which suggests deduplicating public keys even more strongly on the basis of the fundamental parameters (e.g., exponents) to the cryptosystem rather than specific encodings (e.g., PEM) of public keys. ### For more information If you have any questions or comments about this advisory: * Open an issue in [go-tuf](https://github.com/theupdateframework/go-tuf/issues) * Email us at TUF's [mailing list](mailto:theupdateframework@googlegroups.com) * The [#tuf](https://cloud-native.slack.com/archives/C8NMD3QJ3) channel on [CNCF Slack](https://slack.cncf.io/).

GHSA-3633-5h82-39pq Affected Github.com/theupdateframework/go tuf Versions

1 component(s)
Fixed Versions:
0.3.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/theupdateframework/go-tuf
Go
< 0.3.2
0.3.2

References

Frequently Asked Questions

What is GHSA-3633-5h82-39pq?
GHSA-3633-5h82-39pq is a security vulnerability in Github.com/theupdateframework/go tuf involving Go-tuf Improperly handles multiple key IDs for the same public keys in attacker-controlled metadata under CWE-289: Authentication Bypass by Alternate Name.
Which Github.com/theupdateframework/go tuf versions are affected?
Affected versions include releases prior to 0.3.2 across affected packages: github.com/theupdateframework/go-tuf.
What version fixes GHSA-3633-5h82-39pq?
Upgrading to 0.3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/theupdateframework/go-tuf affected?
Yes, github.com/theupdateframework/go-tuf is affected in releases prior to 0.3.2. Upgrade your dependency to 0.3.2 or later.
What CWE is associated with GHSA-3633-5h82-39pq?
GHSA-3633-5h82-39pq is classified under CWE-289: Authentication Bypass by Alternate Name (The product performs authentication based on the name of a resource being accessed, or the name of the actor performing the access, but it does not properly check all possible names for that resource or actor.).
How can I check Go dependencies for GHSA-3633-5h82-39pq?
Run the dependency tree command: 'inspect dependencies for github.com/theupdateframework/go-tuf'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3633-5h82-39pq",
  "modified" : "2026-05-29T20:52:43Z",
  "published" : "2022-09-16T17:17:13Z",
  "aliases" : [ ],
  "summary" : "Go-tuf Improperly handles multiple key IDs for the same public keys in attacker-controlled metadata",
  "details" : "### Issue\n\nIf 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](https://github.com/theupdateframework/go-tuf#client) < [0.3.2](https://github.com/theupdateframework/go-tuf/releases/tag/v0.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.\n\nFor example, suppose that in the root metadata file, there were a threshold of 2 self-signatures required from 2 different keys $K_A$ and $K_B$ 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 $SHA2_{256}(K_A)$, but his public key is listed twice, once with the keyid $SHA2_{256}(K_B)$, and the other with $SHA2_{512}(K_B)$. 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 $SHA2_{256}(K_B)$, and the other with $SHA2_{512}(K_B)$.\n\n### Impact\n\nWhile 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.\n\n### Patches\n\nA fix is available for clients with versions >= [0.3.2](https://github.com/theupdateframework/go-tuf/releases/tag/v0.3.2).\n\n### Workarounds\n\nUsers 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.\n\n### References\n\n* The PR fixing this issue is #369.\n* The [latest](https://theupdateframework.github.io/specification/v1.0.30/index.html#role-keyid) TUF specification advises using only SHA2-256 hashes of public keys.\n* Commit b383bafd27472310a650f3733e686163a868b71a removed support for clients generating multiple key IDs for the same public key. This commit is older than the first [v.0.1.0 tag](https://github.com/theupdateframework/go-tuf/releases/tag/v0.1.0) for go-tuf.\n* There is an outstanding [issue](https://github.com/theupdateframework/go-tuf/issues/368) for removing the non-standard `keyid_hash_algorithms` field in TUF metadata which arguably led to this issue.\n* A more robust solution is discussed (but not necessarily recommended) in [TAP 12](https://github.com/theupdateframework/taps/blob/master/tap12.md), which suggests deduplicating public keys even more strongly on the basis of the fundamental parameters (e.g., exponents) to the cryptosystem rather than specific encodings (e.g., PEM) of public keys.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [go-tuf](https://github.com/theupdateframework/go-tuf/issues)\n* Email us at TUF's [mailing list](mailto:theupdateframework@googlegroups.com)\n* The [#tuf](https://cloud-native.slack.com/archives/C8NMD3QJ3) channel on [CNCF Slack](https://slack.cncf.io/).",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/theupdateframework/go-tuf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/theupdateframework/go-tuf/security/advisories/GHSA-3633-5h82-39pq"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/theupdateframework/go-tuf/pull/369"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/theupdateframework/go-tuf"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-1004"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-289" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-09-16T17:17:13Z",
    "nvd_published_at" : null
  }
}