LiveActive security incident?Get immediate response
CVE Record

CVE-2021-41131: Client metadata path-traversal in python-tuf

python-tuf is a Python reference implementation of The Update Framework (TUF). 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. A fix is available in version 0.19 or newer. There are no workarounds 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.

HighCVSS 7.5Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A vulnerable python-tuf client can be tricked into writing a signed metadata JSON file outside its intended metadata directory. Business risk is integrity loss on systems that use affected python-tuf clients for software update trust, but the attack prerequisites are narrow and the content must be valid signed targets metadata.

Executive priority

Prioritize remediation for update infrastructure, build systems, package distribution, and security tooling using python-tuf clients. The severity is high because integrity impact can be significant, but urgency is moderated by the specific metadata-signing and delegation prerequisites.

Technical view

CVE-2021-41131 is a CWE-22 path traversal in python-tuf clients before 0.19.0. tuf/client and tuf/ngclient used delegated target rolenames to form metadata filenames. A traversal-style rolename could cause get_one_valid_targetinfo() to overwrite files ending in .json outside the intended location.

Likely exposure

Exposure is likely limited to applications embedding python-tuf versions below 0.19.0, especially clients that allow arbitrary rolename selection for delegated targets metadata. Systems only using fixed, controlled roles or already upgraded to 0.19.0 or later are less likely exposed.

Exploitation context

The bundle does not cite active exploitation, and KEV is false. Exploitation requires the attacker to introduce valid signed metadata for a path-traversing role and have that role delegated by existing targets metadata. Written content is constrained to valid signed targets JSON.

Researcher notes

The key exposure question is whether untrusted or attacker-influenced delegated metadata can be signed and delegated into the client trust graph. The advisory states no workaround exists without code changes; version 0.19.0 contains the fix.

Mitigation direction

  • Upgrade python-tuf to version 0.19.0 or newer.
  • Inventory products and services embedding python-tuf clients.
  • For custom forks, restrict delegated rolename characters in code.
  • For custom forks, avoid deriving metadata file paths directly from rolenames.
  • Check vendor or project guidance before relying on non-upgrade mitigations.

Validation and detection

  • Confirm installed python-tuf versions are 0.19.0 or newer.
  • Review dependency manifests, lockfiles, and container images for python-tuf.
  • Identify code paths using tuf/client or tuf/ngclient delegated metadata.
  • Check whether clients permit arbitrary delegated rolename selection.
  • Review metadata storage locations for unexpected overwritten .json files.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-22: File access and web shell behavior lookup

File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

File access behavior lookup

The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-41131 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.5CVSS 3.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N2.24.7Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.5High
CVSS 3.1 vector shape for CVE-2021-41131Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
theupdateframeworkpython-tuf< 0.19.0Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-22 · source CWE mapping

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.