PT-2021-23130 · Tough · Tough
Jkuf
·
Published
2021-10-19
·
Updated
2021-10-26
·
CVE-2021-41150
CVSS v3.1
8.2
High
| Vector | AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:N |
Name of the Vulnerable Software and Affected Versions
tough versions prior to 0.12.0
Description
The tough library does not properly sanitize delegated role names when caching a repository or loading a repository from the filesystem. This can lead to files ending with the .json extension being overwritten with role metadata anywhere on the system. The issue is mitigated by the fact that it only affects implementations that allow arbitrary rolename selection for delegated targets metadata, and the attack requires the ability to insert new metadata for the path-traversing role and 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, and the file extension is always .json.
Recommendations
For tough versions prior to 0.12.0, update to version 0.12.0 or newer to resolve the issue. As a temporary workaround, consider restricting the allowed character set for rolenames or storing metadata in files named in a way that is not vulnerable, although these approaches require code changes.
Fix
Path traversal
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Tough