freenode

← CVE tracker

CVE-2026-126604

Incorrect Behavior Order: Validate Before Canonicalize in sanitize-filename

Severity
high CVSS 7.4 (v3.1)
Affects
sanitize-filename · J++ / Newsworthy
Weakness
CWE-180: Incorrect Behavior Order: Validate Before Canonicalize
Published
3 December 2026 by GitLab
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")`

Our coverage

We have not written about this one. Know why it matters? Send a tip.