Incorrect Behavior Order: Validate Before Canonicalize in sanitize-filename
- Exploited
- No known exploitation
- Fix
- Fixed in 1.2.1
- Who is exposed
- Not reported
Summary
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")
What to do
Upgrade to a fixed version: 1.2.1.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-126604 (Incorrect Behavior Order: Validate Before Canonicalize in sanitize-filename), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-126604 (entry last updated 2026-12-03):
Affected:
- J++ / Newsworthy sanitize-filename: fixed in 1.2.1
Fixed versions: 1.2.1.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: network access, no login, no user action.
CISA KEV: CVE-2026-126604 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-126604 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://gitlab.com/jplusplus/sanitize-filename/-/tags/1.2.1
- https://www.cve.org/CVERecord?id=CVE-2026-126604
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-126604
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-126604"}.Affected versions
- J++ / Newsworthy sanitize-filenamefixed in 1.2.1
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure17/25No login or user action needed, reachable over the network without a login · Unknown: Advisories don't say whether default setups are affected
- Reach?/20Unknown. No tracked technology or package matched
- Severity7.4/10CVSS 7.4
- No patch0/5No signal
What would change the score
- Would score about 69 if added to CISA KEV
- Would score about 64 if CISA's SSVC rates exploitation active
- Would score about 29 if advisories confirm default setups are exposed
Timeline
- CVE published
- First seen by cve.now
Evidence 3
| Kind | Source |
|---|---|
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-126604 |
| Record | NVD · CVE-2026-126604 |
| Other links 1 | |
| Link | gitlab.com · jplusplus/sanitize-filename/-/tags/1.2.1 |
Questions about CVE-2026-126604
Is CVE-2026-126604 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
Which versions are affected by CVE-2026-126604?
sanitize-filename: before 1.2.1.
Source: cve.now feed data
How do I fix CVE-2026-126604?
Upgrade to a fixed version: 1.2.1. The vendor's advisory also recommends 1.2.1 or later or later.
Source: cve.now feed data, cve.org
Related
- CVE-2026-126837Attacker able to redirect a client's database traffic to a host they control via special characters in an SRV target, bypassing the SRV…
- CVE-2026-73420NextAuth.js: Email normalizer validates the address before Unicode normalization, allowing a homoglyph @ bypass
- CVE-2026-114622baserCMS: Encoded path traversal bypass in the theme file API
- CVE-2026-69246Guzzle: Noncanonical host can bypass host-based checks
- CVE-2026-134318better-auth 1.5.5 before 1.7.16 Privilege Escalation via Padded Invitation Role
- CVE-2026-118662Vite: `server.fs.deny` bypassed with queries
No corrections so far. Something wrong on this page? Report an error.