Description
sanitize-filename (PyPI) < 1.2.1 is vulnerable to path traversal attacks. sanitize() removed blacklisted characters before applying Unicode NFKD normalization. Characters such as FULLWIDTH SOLIDUS (U+FF0F), FULLWIDTH REVERSE SOLIDUS (U+FF3C) and SMALL REVERSE SOLIDUS (U+FE68) passed the blacklist and became real path separators in the returned value. An attacker who controls the input filename could make sanitize() return an absolute path. Example, `sanitize("\uFF0F..\uFF0F..\uFF0F..\uFF0Fetc\uFF0Fpasswd")`
Published: 2026-12-03
Score: 7.4 High
EPSS: n/a
KEV: No
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

Vendor Solution

Upgrade to sanitize-filename 1.2.1 or later.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 03 Dec 2026 22:45:00 +0000

Type Values Removed Values Added
Description sanitize-filename (PyPI) < 1.2.1 is vulnerable to path traversal attacks. sanitize() removed blacklisted characters before applying Unicode NFKD normalization. Characters such as FULLWIDTH SOLIDUS (U+FF0F), FULLWIDTH REVERSE SOLIDUS (U+FF3C) and SMALL REVERSE SOLIDUS (U+FE68) passed the blacklist and became real path separators in the returned value. An attacker who controls the input filename could make sanitize() return an absolute path. Example, `sanitize("\uFF0F..\uFF0F..\uFF0F..\uFF0Fetc\uFF0Fpasswd")`
Title Incorrect Behavior Order: Validate Before Canonicalize in sanitize-filename
Weaknesses CWE-180
References
Metrics cvssV3_1

{'score': 7.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitLab

Published:

Updated: 2026-12-03T22:33:41.670Z

Reserved: 2026-11-11T07:24:37.518Z

Link: CVE-2026-126604

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses