Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS03N2hoLTQzY20tdjhqNs4AA5V2

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

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:

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.

Permalink: https://github.com/advisories/GHSA-77hh-43cm-v8j6
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS03N2hoLTQzY20tdjhqNs4AA5V2
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Low
Classification: General
Published: 9 months ago
Updated: 9 months ago


Identifiers: GHSA-77hh-43cm-v8j6
References: Repository: https://github.com/theupdateframework/python-tuf
Blast Radius: 0.0

Affected Packages

pypi:tuf
Dependent packages: 4
Dependent repositories: 39
Downloads: 211,058 last month
Affected Version Ranges: >= 2.0.0, < 3.1.1
Fixed in: 3.1.1
All affected versions: 2.0.0, 2.1.0, 3.0.0, 3.1.0
All unaffected versions: 0.7.5, 0.9.8, 0.9.9, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.11.1, 0.12.0, 0.12.1, 0.12.2, 0.13.0, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.18.1, 0.19.0, 0.20.0, 1.0.0, 1.1.0, 3.1.1, 4.0.0, 5.0.0, 5.1.0