CVE-2021-41131: Path Traversal Vulnerability in tuf Package

tuf Updated 02 Oct 2025

Summary

19/10/2021
Yes i
Moderate
7.5

CVE-2021-41131: Client metadata path-traversal. Affects tuf versions < 0.19.0. Fixed in 0.19.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The tuf package is an open-source software updater for secure distribution of files. It provides a framework for verifying the integrity and authenticity of files using cryptographic signatures. The package is widely used in various applications to ensure secure software updates. However, a path traversal vulnerability has been discovered in the tuf package, which allows an attacker to overwrite files ending in .json on the client system. This vulnerability can be exploited by manipulating the rolename parameter and inserting malicious metadata. The impact of this vulnerability is mitigated by certain factors, but it still poses a significant risk to systems that allow arbitrary rolename selection for delegated targets metadata.

Vulnerability Detail

The path traversal vulnerability in the tuf package allows an attacker to traverse the file system and overwrite files ending in .json. This vulnerability arises when the rolename parameter is used to form the filename, and it can contain path traversal characters. By inserting new metadata for a path-traversing role and getting the role delegated by existing targets metadata, an attacker can overwrite arbitrary files on the client system. However, the written file content is restricted to valid, signed targets files with the .json extension. The severity of this vulnerability is rated as HIGH with a CVSS score of 7.5.

How To Fix

Latest published version: 7.0.1 as of 23 Oct 2026

pip install --upgrade "tuf==7.0.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.19.0

This is the first release that contains the fix.

pip install --upgrade "tuf==0.19.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There are no effective workarounds for this vulnerability that do not require code changes. However, clients can implement certain measures to mitigate the risk. One approach is to restrict the allowed character set for rolenames, ensuring that they cannot contain path traversal characters. Another option is to store metadata in files named in a way that is not vulnerable to path traversal. However, both of these approaches require modifications to the python-tuf code.

Conclusion

The path traversal vulnerability in the tuf package poses a significant risk to systems that allow arbitrary rolename selection for delegated targets metadata. It allows an attacker to overwrite files ending in .json on the client system by manipulating the rolename parameter. To mitigate this vulnerability, it is crucial to update the tuf package to version 0.19 or newer. Additionally, implementing measures like restricting character sets for rolenames can further reduce the risk. For further support and assistance in vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for tuf →

Share this vulnerability

FAQ

The tuf package is an open-source software updater for secure distribution of files. It provides a framework for verifying the integrity and authenticity of files using cryptographic signatures.

The path traversal vulnerability in tuf allows an attacker to overwrite files ending in .json on the client system. However, the impact is mitigated by certain factors, such as the need for the attacker to insert new metadata and get the role delegated by existing targets metadata. Additionally, the written file content is restricted to valid, signed targets files with the .json extension.

To fix the vulnerability, update the tuf package to version 0.19 or newer. This update includes a fix for the path traversal issue and ensures proper sanitization of the rolename parameter.

There are no effective workarounds for this vulnerability that do not require code changes. However, clients can implement measures like restricting the character set for rolenames or storing metadata in files named in a way that is not vulnerable to path traversal.

For more information, you can refer to the official advisory in the python-tuf repository or contact the maintainers via email or Slack.

Related vulnerabilities

Recent vulnerabilities recorded for tuf.

How To Fix

Latest published version: 7.0.1 as of 23 Oct 2026

pip install --upgrade "tuf==7.0.1"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.19.0

This is the first release that contains the fix.

pip install --upgrade "tuf==0.19.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback