{"id":"CVE-2024-47534","aliases":["CVE-2024-47534","GHSA-4f8r-qqr9-fq8j","GO-2024-3166"],"related":["CGA-8784-5948-h3qw"],"kind":"vulnerability","state":"published","title":"Incorrect delegation lookups can make go-tuf download the wrong artifact","summary":"go-tuf is a Go implementation of The Update Framework (TUF). The go-tuf client inconsistently traces the delegations. For example, if targets delegate to \"A\", and to \"B\", and \"B\" delegates to \"C\", then the client should trace the delegations in the order \"A\" then \"B\" then \"C\" but it may incorrectly trace the delegations \"B\"->\"C\"->\"A\". This vulnerability is fixed in 2.0.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"go-tuf is a Go implementation of The Update Framework (TUF). The go-tuf client inconsistently traces the delegations. For example, if targets delegate to \"A\", and to \"B\", and \"B\" delegates to \"C\", then the client should trace the delegations in the order \"A\" then \"B\" then \"C\" but it may incorrectly trace the delegations \"B\"->\"C\"->\"A\". This vulnerability is fixed in 2.0.1.","source":"cvelist"},{"lang":"en","text":"During the ongoing work on the TUF conformance test suite, we have come across a test that reveals what we believe is a bug in go-tuf with security implications. The bug exists in go-tuf delegation tracing and could result in downloading the wrong artifact. \n\nWe have come across this issue in the test in this PR: https://github.com/theupdateframework/tuf-conformance/pull/115.\n\nThe test - `test_graph_traversal` - sets up a repository with a series of delegations, invokes the clients `refresh()` and then checks the order in which the client traced the delegations. The test shows that the go-tuf client inconsistently traces the delegations in a wrong way. For example, [during one CI run](https://github.com/theupdateframework/tuf-conformance/pull/115#issuecomment-2275625542), the `two-level-delegations` test case triggered a wrong order. The delegations in this look as such:\n\n```python\n\"two-level-delegations\": DelegationsTestCase(\n        delegations=[\n            DelegationTester(\"targets\", \"A\"),\n            DelegationTester(\"targets\", \"B\"),\n            DelegationTester(\"B\", \"C\"),\n        ],\n        visited_order=[\"A\", \"B\", \"C\"],\n    ),\n```\n\nHere, `targets` delegate to `\"A\"`, and to `\"B\"`, and `\"B\"` delegates to `\"C\"`. The client should trace the delegations in the order `\"A\"` then `\"B\"` then `\"C\"` but in this particular CI run, go-tuf traced the delegations `\"B\"->\"C\"->\"A\"`.\n\nIn a subsequent CI run, this test case did not fail, but [another one did](https://github.com/theupdateframework/tuf-conformance/pull/115#issuecomment-2275640487).\n\n@jku has done a bit of debugging and believes that the returned map of `GetRolesForTarget` returns a map that causes this behavior:\n\nhttps://github.com/theupdateframework/go-tuf/blob/f95222bdd22d2ac4e5b8ed6fe912b645e213c3b5/metadata/metadata.go#L565-L580\n\nWe believe that this map should be an ordered list instead of a map.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Incorrect delegation lookups can make go-tuf download the wrong artifact in github.com/theupdateframework/go-tuf","format":"markdown","source":"go"},{"lang":"es","text":"go-tuf es una implementación de Go de The Update Framework (TUF). El cliente go-tuf rastrea las delegaciones de forma inconsistente. Por ejemplo, si los destinos delegan a \"A\" y a \"B\", y \"B\" delega a \"C\", entonces el cliente debería rastrear las delegaciones en el orden \"A\", luego \"B\" y luego \"C\", pero puede rastrear incorrectamente las delegaciones \"B\" -&gt; \"C\" -&gt; \"A\". Esta vulnerabilidad se solucionó en la versión 2.0.1.","source":"nvd"}],"published":"2024-10-01T15:17:47.363Z","modified":"2026-09-10T03:50:19.201Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-362"],"affected":[{"ranges":[{"version":">= 2.0.0, < 2.0.1","status":"affected"}],"vendor":"theupdateframework","product":"go-tuf","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"2.0.1","status":"affected"}],"vendor":"theupdateframework","product":"go-tuf","cpe":"cpe:2.3:a:theupdateframework:go-tuf:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.1"}],"ecosystem":"Go","package":"github.com/theupdateframework/go-tuf/v2","purl":"pkg:golang/github.com/theupdateframework/go-tuf/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.1"}],"ecosystem":"Go","package":"github.com/theupdateframework/go-tuf/v2","purl":"pkg:golang/github.com/theupdateframework/go-tuf/v2","source":"go"}],"references":[{"url":"https://github.com/theupdateframework/go-tuf/security/advisories/GHSA-4f8r-qqr9-fq8j","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/theupdateframework/tuf-conformance/pull/115","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/theupdateframework/go-tuf/commit/edc30b474f5afd4cc603e17149704d5aa605151d","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/theupdateframework/go-tuf/commit/f36420caba9edbfdfd64f95a9554c0836d9cf819","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/theupdateframework/go-tuf/blob/f95222bdd22d2ac4e5b8ed6fe912b645e213c3b5/metadata/metadata.go#L565-L580","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47534","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/theupdateframework/go-tuf","tags":["package"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2024-3166","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-10-01T17:17:37.439Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-47534","url":"https://www.cve.org/CVERecord?id=CVE-2024-47534","licence":"CVE Terms of Use","modified":"2024-11-21T16:56:38.062Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4f8r-qqr9-fq8j","url":"https://github.com/advisories/GHSA-4f8r-qqr9-fq8j","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:19.201Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-3166","url":"https://pkg.go.dev/vuln/GO-2024-3166","licence":"CC-BY-4.0","modified":"2026-02-04T03:36:06.873Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-47534","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47534","licence":"Public domain","modified":"2026-06-17T07:57:15.433Z"}],"updatedAt":"2026-11-25T22:58:45.931Z","epss":{"score":0.00831,"percentile":0.54846,"date":"2026-11-30T12:00:22.000Z"}}