{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-126604",
        "assignerOrgId": "ceab7361-8a18-47b1-92ba-4d7d25f6715a",
        "state": "PUBLISHED",
        "assignerShortName": "GitLab",
        "dateReserved": "2026-11-11T07:24:37.518Z",
        "datePublished": "2026-12-03T22:33:41.670Z",
        "dateUpdated": "2026-12-03T22:33:41.670Z"
    },
    "containers": {
        "cna": {
            "title": "Incorrect Behavior Order: Validate Before Canonicalize in sanitize-filename",
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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\")`"
                }
            ],
            "affected": [
                {
                    "vendor": "J++ / Newsworthy",
                    "product": "sanitize-filename",
                    "repo": "https://gitlab.com/jplusplus/sanitize-filename",
                    "versions": [
                        {
                            "version": "0",
                            "status": "affected",
                            "lessThan": "1.2.1",
                            "versionType": "semver"
                        }
                    ],
                    "defaultStatus": "unaffected"
                }
            ],
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "description": "CWE-180: Incorrect Behavior Order: Validate Before Canonicalize",
                            "cweId": "CWE-180",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://gitlab.com/jplusplus/sanitize-filename/-/tags/1.2.1"
                }
            ],
            "metrics": [
                {
                    "format": "CVSS",
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "GENERAL"
                        }
                    ],
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N",
                        "attackVector": "NETWORK",
                        "attackComplexity": "HIGH",
                        "privilegesRequired": "NONE",
                        "userInteraction": "NONE",
                        "scope": "UNCHANGED",
                        "confidentialityImpact": "HIGH",
                        "integrityImpact": "HIGH",
                        "availabilityImpact": "NONE",
                        "baseScore": 7.4,
                        "baseSeverity": "HIGH"
                    }
                }
            ],
            "solutions": [
                {
                    "lang": "en",
                    "value": "Upgrade to sanitize-filename 1.2.1 or later."
                }
            ],
            "credits": [
                {
                    "lang": "en",
                    "value": "Alex Brumen (@brumens2)",
                    "type": "finder"
                }
            ],
            "providerMetadata": {
                "orgId": "ceab7361-8a18-47b1-92ba-4d7d25f6715a",
                "shortName": "GitLab",
                "dateUpdated": "2026-12-03T22:33:41.670Z"
            }
        }
    }
}