{"answers":{"affected":"2 open source packages ship an affected version, including tuf.","exploited":"There is no known exploitation of GHSA-77hh-43cm-v8j6 in the wild and no public exploit code.","fix":"Upgrade tuf to 3.1.1 or later.","what":"GHSA-77hh-43cm-v8j6 is a vulnerability in tuf, published on 16 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-77hh-43cm-v8j6 and fix it if it is affected.\n\nWhat it is: GHSA-77hh-43cm-v8j6 is a vulnerability in tuf, published on 16 Feb 2024. 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-77hh-43cm-v8j6 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- tuf (PyPI): affected from 2.0.0; fixed in 3.1.1\n- tuf (PyPI): affected from 2.0.0; fixed in 3.1.1\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-77hh-43cm-v8j6/ (Markdown: https://insights.sbomify.com/GHSA-77hh-43cm-v8j6/index.md)","id":"GHSA-77hh-43cm-v8j6","markdown":"https://insights.sbomify.com/GHSA-77hh-43cm-v8j6/index.md","name":"GHSA-77hh-43cm-v8j6","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"Python TUF library","requires_auth":"none","summary":"Attackers can bypass delegation verification in TUF metadata if succinct delegation is used, potentially accepting unauthorized metadata signatures.","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":"The security of both a TUF client and repository implementations depend on the concept of trusted Metadata objects verifying the signatures over other Metadata that it delegates to. This verification process uses `Targets.get_delegated_role(delegated_role: str)` to find the delegation information.\n\n`tuf.api.metadata.Targets.get_delegated_role()` should ensure that the given `delegated_rolename` is actually a name of a role that is delegated by that Targets, but in the case of \"succinct delegation\" this does not happen.\n\n`tuf.ngclient` users are **not** impacted but direct users of `tuf.api.metadata` could be impacted.\n\n### Impact\n\nIf an attacker can make a Metadata API user run `Targets.get_delegated_role()` so that \n1. the `Targets` uses succinct delegation\n1. the `delegated_role` argument is not actually delegated by the `Targets`\n\nthe result will be incorrect.\n\nThis also means that if an attacker can make a Metadata API user run `Targets.verify_delegate()` or `Targets.get_verification_result()` so that\n1. the delegating `Targets` uses a succinct delegation\n1. the `delegated_role` argument is the name of some unrelated Metadata\n1. that other Metadata is correctly signed by the keys defined in the succinct delegation\n\nthe result would be a successful verification even though the `Targets` in question does not actually delegate to `delegated_role`.\n\nThe impact is estimated to be low for following reasons:\n\n* This cannot impact a TUF client that implements the client workflow as specified since the delegated role name is not an input but is collected from the (trusted) delegating Targets itself\n* Actual signature verification is not bypassed: The verified metadata _must_ still be correctly signed by the keys specified in the delegating role.\n* The described situations are somewhat hypothetical: there does not seem to be any reason for a python-tuf user (whether client or a repository) to use `tuf.api.metadata` in this way.\n\nAll users of `tuf.ngclient` are specifically **not** impacted. Users of `tuf.api.metadata` could be impacted if they use succinct delegations in a way described above.\n\n### Patches\n\nA fix is available in python-tuf 3.1.1 as commit 77cb66bc and in later releases as commit eb4834d9._\n\n### Workarounds\n\n`tuf.api.metadata` users should only call `Targets.get_delegated_role()`, `Targets.verify_delegate()` or `Targets.get_verification_result()` with `delegated_role` argument that is known to be delegated by the `Targets` in question.","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"tuf's Metadata API: Targets.get_delegated_role() is missing input validation","id":"GHSA-77hh-43cm-v8j6","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"security_feature_bypass","year":"2024"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["3.1.1"],"introduced":["2.0.0"],"last_affected":[],"package":"tuf","purl":null,"source":"GHSA-77hh-43cm-v8j6"},{"ecosystem":"PyPI","fixed":["3.1.1"],"introduced":["2.0.0"],"last_affected":[],"package":"tuf","purl":"pkg:pypi/tuf","source":"GHSA-77hh-43cm-v8j6"}],"products":null,"published":"2024-02-16","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can bypass delegation verification in TUF metadata if succinct delegation is used, potentially accepting unauthorized metadata signatures.","url":"https://insights.sbomify.com/GHSA-77hh-43cm-v8j6/"}