{"cve":"CVE-2021-41131","nvd":{"published":"2021-10-19T18:15:07.967","modified":"2026-06-17T04:07:56.143","status":"Modified","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H","score":8.7},"cwes":["CWE-22"],"references":["https://github.com/theupdateframework/python-tuf/commit/4ad7ae48fda594b640139c3b7eae21ed5155a102","https://github.com/theupdateframework/python-tuf/issues/1527","https://github.com/theupdateframework/python-tuf/security/advisories/GHSA-wjw6-2cqr-j4qr","https://github.com/theupdateframework/python-tuf/commit/4ad7ae48fda594b640139c3b7eae21ed5155a102","https://github.com/theupdateframework/python-tuf/issues/1527"],"products":["linuxfoundation:the_update_framework"],"source":"nvd","synced_at":"2026-10-19T21:24:39.218183596+00:00"},"epss":{"cve":"CVE-2021-41131","score":0.0145,"percentile":0.73368,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-wjw6-2cqr-j4qr","url":"https://osv.dev/vulnerability/GHSA-wjw6-2cqr-j4qr","summary":"Client metadata path-traversal","modified":"2026-07-08T06:27:19.270753446Z","packages":[{"ecosystem":"PyPI","name":"tuf","purl":"pkg:pypi/tuf","ranges":["<0.19.0"],"fixed":["0.19.0"]}]},{"id":"PYSEC-2021-376","url":"https://osv.dev/vulnerability/PYSEC-2021-376","summary":"","modified":"2025-01-14T08:57:32.424418Z","packages":[{"ecosystem":"PyPI","name":"tuf","purl":"pkg:pypi/tuf","ranges":["<0.19.0"],"fixed":["0.19.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}