Path traversal in sanitize-filename via Unicode normalization
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
sanitize-filename (PyPI) before 1.2.1 is vulnerable to path traversal. The sanitize() function removes blacklisted characters before applying Unicode NFKD normalization, so fullwidth solidus and reverse solidus characters pass the blacklist and become real path separators in the returned value. An attacker who controls the input filename can make sanitize() return an absolute path.
Written with Claude Haiku 5.5 from the sources below · 2026-12-04
Description from the CNA
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")`
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| J++ / Newsworthy | sanitize-filename | before 1.2.1 | 1.2.1 | Patch available | CNA |
- sanitize-filename VendorJ++ / Newsworthy Affected before 1.2.1 Fixed in 1.2.1 Patch available CNA
Remediation
Upgrade sanitize-filename (PyPI) to version 1.2.1.
Written with Claude Haiku 5.5 from the sources below · 2026-12-04
- Fix · CNA sanitize-filename (J++ / Newsworthy) Fixed in 1.2.1
Timeline
- 2026-12-03 Threatist record created from CVE-2026-126604
- 2026-12-04 Alias added: GHSA-6v59-65x2-cq7r
References
Sources
- CVE-2026-126604 · CVE Program
- CVE-2026-126604 · NVD
- GHSA-6v59-65x2-cq7r · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences