CVE-2026-126604

7.4High

Published Dec 4, 2026 · NVD status: Received · AI triage by gemini-3.1-flash-lite

7.4CVSS

High

0CVSS v3.110

Attack vector
Network
Complexity
High
Privileges
None
User action
None
Impact
High impact on confidentiality, integrity
Weakness
CWE-180

What an attacker gets

Attackers can perform path traversal to read or write arbitrary files on the system. This requires the application to pass user-controlled input into the sanitize() function.

Root cause

The library performs Unicode NFKD normalization after the blacklist filter, allowing obfuscated path separators to bypass security checks.

Affected versions

sanitize-filename versions prior to 1.2.1

CVSS v3.1 · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

Fix & remediation

Upgrade to sanitize-filename 1.2.1 or later. If you cannot update, validate or sanitize input filenames using a strict allowlist of characters before passing them to this library.

remediation — bash
$ pip install --upgrade sanitize-filename

AI-suggested. Run it in staging first and check it against the vendor advisory. Why?

NVD 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")`

References

Source: nvd.nist.gov/vuln/detail/CVE-2026-126604

More fully triaged vulnerabilities you may want to check next.