Categories
CVE-2021-41131

Path Traversal in tuf (CVE-2021-41131)

Summary

Path traversal in tuf (CVE-2021-41131). Data can be tampered with by attackers. Mitigation: upgrade to 0.19.0 or later.

Original description

The description as published by the source.

Impact

In both clients (tuf/client and tuf/ngclient), there is a path traversal vulnerability that in the worst case can overwrite files ending in .json anywhere on the client system on a call to get_one_valid_targetinfo(). It occurs because the rolename is used to form the filename, and may contain path traversal characters (ie ../../name.json).

The impact is mitigated by a few facts:

  • It only affects implementations that allow arbitrary rolename selection for delegated targets metadata
  • The attack requires the ability to A) insert new metadata for the path-traversing role and B) get the role delegated by an existing targets metadata
  • The written file content is heavily restricted since it needs to be a valid, signed targets file. The file extension is always .json.

Patches

A fix is available in version 0.19 or newer.

Workarounds

None that do not require code changes. Clients can restrict the allowed character set for rolenames, or they can store metadata in files named in a way that is not vulnerable: neither of these approaches is possible without modifying python-tuf.

References

For more information

If you have any questions or comments about this advisory:

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2021-41131 has been found in tuf.
Data can be tampered with by attackers.
What to do: upgrade tuf to 0.19.0 or later.
If unsure, ask your IT team or search "tuf CVE-2021-41131" on the vendor's site.

CVE-2021-41131 (tuf) — CWE-22
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Patched: 0.19.0 — apply immediately
Workaround: None that do not require code changes.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

Path traversal (CWE-22) exists in tuf.

📍 Affected scope

Check the vendor advisory for the affected versions of tuf.

🔥 Severity

Severity: ?. Data can be tampered with by attackers.

🔧 How to fix

Update to 0.19.0.

🛡️ Workaround

Workaround: None that do not require code changes.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'tuf' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'tuf' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で tuf を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaround mitigate
    None that do not require code changes.

    パッチが適用されるまでの応急処置として、None that do not require code changes. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade tuf to 0.19.0

    ステージング環境で 0.19.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

PyPI tuf
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details