CVE-2023-46695 is a high-severity (CVSS 7.5) CWE-770 vulnerability in django. EPSS puts its 30-day exploitation probability at 53.4% (99th percentile). A fix is available for django — see the affected versions and patch details below.
Django potential denial of service vulnerability in UsernameField on Windows
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
django🐍django🐍djangoReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
An issue was discovered in Django 3.2 before 3.2.23, 4.1 before 4.1.13, and 4.2 before 4.2.7. The NFKC normalization is slow on Windows. As a consequence, django.contrib.auth.forms.UsernameField is subject to a potential DoS (denial of service) attack via certain inputs with a very large number of Unicode characters.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | django | ≥ 3.2a1&&< 3.2.23 | 3.2.23pip install --upgrade 'django==3.2.23' |
| 🐍PyPI | django | ≥ 4.1a1&&< 4.1.13 | 4.1.13pip install --upgrade 'django==4.1.13' |
| 🐍PyPI | django | ≥ 4.2a1&&< 4.2.7 | 4.2.7pip install --upgrade 'django==4.2.7' |
Affected Products
djangodjangoprojectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for django, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update django to 3.2.23 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-46695 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Frequently Asked Questions
Is CVE-2023-46695 in your dependencies?
Find it across PyPI, including transitive dependencies.