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

GHSA-r7vq-6425-j94w

Python-TUF vulnerable to incorrect threshold signature computation for new root metadata

Published
Sep 15, 2022
Updated
Dec 6, 2024
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

Blast Radius

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

Impact

The function _verify_root_self_signed(), introduced in v0.14.0, and which verifies self-signatures in a new root metadata file, counted multiple signatures by any new root key towards the new threshold. That is, any single new root key could theoretically provide enough signatures to meet the threshold for new key self-signatures required during root metadata update.

A scenario where this attack could be relevant is amazingly unlikely in practice to the point where labeling this issue as a security advisory is potentially overstating the impact of the issue. Given that new root keys only become trusted by the client after a successful root metadata update, which also requires the quorum of signatures from old trusted root keys, this issue has been evaluated as low in severity.

In particular, in order to exploit this vulnerability, an attacker must:

  1. Control one new root key.
  2. Craft a new root metadata file such that there is a number of signatures by this new root key greater than or equal to the new threshold.
  3. Cause a valid threshold of the old root keys to sign this new root metadata file.
  4. Cause this new root metadata file to be published on the repository.
  5. Cause clients to rotate to this new root metadata file.

Patches

A fix is available since version 0.16.0.

Workarounds

No workarounds are known for this issue.

References

  • Pull request resolving the issue PR 1218
  • Pull request which introduced the faulty computation of signature threshold on new root metadata PR 1101
  • A similar previous issue with incorrectly computed signature thresholds in tuf is described in GHSA-pwqf-9h7j-7mv8

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPItuf0.14.0&&< 0.16.00.16.0

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. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update tuf to 0.16.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-r7vq-6425-j94w 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 pinpoints whether GHSA-r7vq-6425-j94w is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-r7vq-6425-j94w. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact The function `_verify_root_self_signed()`, introduced in [v0.14.0](https://github.com/theupdateframework/tuf/releases/tag/v0.14.0), and which verifies self-signatures in a new root metadata file, counted multiple signatures by any new root key towards the new threshold. That is, any single new root key could theoretically provide enough signatures to meet the threshold for new key self-signatures required during root metadata update. A scenario where this attack could be relevant is amazingly unlikely in practice to the point where labeling this issue as a security advisory is pot
O3 Security · Impact-Aware SCA

Is GHSA-r7vq-6425-j94w in your dependencies?

O3 detects GHSA-r7vq-6425-j94w across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.