---
id: CVE-2021-41149
aliases:
  - GHSA-x3r5-q6mj-m485
title: Improper sanitization of target names
summary: Improper sanitization of target names
severity: high
cvss: 8.2
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:N'
vendor: tough
product: tough
ecosystem: rust
affected:
  - tough < 0.12.0
patched:
  - tough 0.12.0
published: '2021-10-19'
updated: '2026-07-08'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-x3r5-q6mj-m485'
references:
  - url: 'https://github.com/awslabs/tough/security/advisories/GHSA-x3r5-q6mj-m485'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2021-41149'
  - url: >-
      https://github.com/awslabs/tough/commit/1809b9bd1106d78a51fbea3071aa97a3530bac9a
  - url: 'https://github.com/awslabs/tough'
tags:
  - osv
  - rust
epss: 0.01113
epssPercentile: 0.64568
ingestedAt: '2026-07-09T18:56:37.340Z'
---

## Overview

### Impact
The tough library, prior to 0.12.0, does not properly sanitize target names when caching a repository, or when saving specific targets to an output directory. When targets are cached or saved, files could be overwritten with arbitrary content anywhere on the system.

AWS would like to thank https://github.com/jku for reporting this issue.

### Patches
A fix is available in version 0.12.0.

### Workarounds
No workarounds to this issue are known.


## Affected packages

- `tough < 0.12.0`

## Remediation

Upgrade to a patched release:

- `tough 0.12.0`
