{"answers":{"affected":"3 open source packages ship an affected version, including github.com/theupdateframework/go-tuf.","exploited":"There is no known exploitation of GHSA-3633-5h82-39pq in the wild and no public exploit code.","fix":"Upgrade github.com/theupdateframework/go-tuf to 0.3.2 or later.","what":"GHSA-3633-5h82-39pq is a vulnerability in github.com/theupdateframework/go-tuf, published on 16 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-3633-5h82-39pq and fix it if it is affected.\n\nWhat it is: GHSA-3633-5h82-39pq is a vulnerability in github.com/theupdateframework/go-tuf, published on 16 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-3633-5h82-39pq in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/theupdateframework/go-tuf (Go): affected all versions; fixed in 0.3.2\n- github.com/theupdateframework/go-tuf (Go): affected all versions; fixed in 0.3.2\n- github.com/theupdateframework/go-tuf (Go): affected all versions; fixed in 0.3.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-3633-5h82-39pq/ (Markdown: https://insights.sbomify.com/GHSA-3633-5h82-39pq/index.md)","id":"GHSA-3633-5h82-39pq","markdown":"https://insights.sbomify.com/GHSA-3633-5h82-39pq/index.md","name":"GHSA-3633-5h82-39pq","record":{"aliases":["GO-2022-1004"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Go TUF client library","requires_auth":"none","summary":"Attackers can bypass signature thresholds in go-tuf clients by duplicating public keys with different IDs, allowing unauthorized metadata updates.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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) \u003c [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 \u003c 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 \u003c 0.3.2 to fall prey to this issue.\n\n### Patches\n\nA fix is available for clients with versions \u003e= [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/).","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Go-tuf Improperly handles multiple key IDs for the same public keys in attacker-controlled metadata","id":"GHSA-3633-5h82-39pq","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"security_feature_bypass","year":"2022"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["0.3.2"],"introduced":["0"],"last_affected":[],"package":"github.com/theupdateframework/go-tuf","purl":null,"source":"GHSA-3633-5h82-39pq"},{"ecosystem":"Go","fixed":["0.3.2"],"introduced":["0"],"last_affected":[],"package":"github.com/theupdateframework/go-tuf","purl":"pkg:golang/github.com/theupdateframework/go-tuf","source":"GHSA-3633-5h82-39pq"},{"ecosystem":"Go","fixed":["0.3.2"],"introduced":["0"],"last_affected":[],"package":"github.com/theupdateframework/go-tuf","purl":"pkg:golang/github.com/theupdateframework/go-tuf","source":"GO-2022-1004"}],"products":null,"published":"2022-09-16","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can bypass signature thresholds in go-tuf clients by duplicating public keys with different IDs, allowing unauthorized metadata updates.","url":"https://insights.sbomify.com/GHSA-3633-5h82-39pq/"}