Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍 PyPI
Not in CISA KEV

GHSA-77hh-43cm-v8j6 — tuf

Fix: theupdateframework/python-tuf@77cb66b

GHSA-77hh-43cm-v8j6 is a security vulnerability in tuf. A fix is available for tuf — see the affected versions and patch details below.

tuf's Metadata API: Targets.get_delegated_role() is missing input validation

Published
Feb 16, 2024
Updated
Feb 16, 2024
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Feb 16, 2024 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
🐍tuf

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

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.

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.

tuf.ngclient users are not impacted but direct users of tuf.api.metadata could be impacted.

Impact

If an attacker can make a Metadata API user run Targets.get_delegated_role() so that

  1. the Targets uses succinct delegation
  2. the delegated_role argument is not actually delegated by the Targets

the result will be incorrect.

This also means that if an attacker can make a Metadata API user run Targets.verify_delegate() or Targets.get_verification_result() so that

  1. the delegating Targets uses a succinct delegation
  2. the delegated_role argument is the name of some unrelated Metadata
  3. that other Metadata is correctly signed by the keys defined in the succinct delegation

the result would be a successful verification even though the Targets in question does not actually delegate to delegated_role.

The impact is estimated to be low for following reasons:

  • 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
  • Actual signature verification is not bypassed: The verified metadata must still be correctly signed by the keys specified in the delegating role.
  • 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.

All 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.

Patches

A fix is available in python-tuf 3.1.1 as commit 77cb66bc and in later releases as commit eb4834d9._

Workarounds

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPItuf≥ 2.0.0&&< 3.1.13.1.1pip install --upgrade 'tuf==3.1.1'

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for tuf, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update tuf to 3.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-77hh-43cm-v8j6 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-77hh-43cm-v8j6 can be triaged on real exposure rather than presence alone.

Tailored to GHSA-77hh-43cm-v8j6. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

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. `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. `tuf.ngclient` users are **not** impacted but direct users of `tuf.api.met
O3 Security · Impact-Aware SCA

Is GHSA-77hh-43cm-v8j6 in your dependencies?

O3 Security finds GHSA-77hh-43cm-v8j6 across PyPI dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

GHSA-77hh-43cm-v8j6: tuf | O3 Security