# CVE-2023-46695: Potential denial of service vulnerability in UsernameField on Windows

UsernameField NFKC-normalized oversized Unicode input on Windows, so a single admin login POST with 1M+ chars took 4.4s and concurrent requests caused 504 timeouts.

- Payout: $2,540
- Severity: medium
- Program: Internet Bug Bounty
- Found by: mprogrammer
- Disclosed: 2023-11-29
- CVE: CVE-2023-46695
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/2258758
- Library page: https://bugbountylibrary.com/r/h1%3A2258758
- Tags: area:web domain:web impact:dos kind:bounty platform:hackerone sev:medium tech:python technique:fuzzing vuln:dos

**Target:** Django django.contrib.auth.forms.UsernameField on Windows
**Root cause:** UsernameField ran NFKC normalization on the full input before length validation; NFKC is slow on Windows, so very long Unicode strings consumed excessive CPU.
**Steps:**
1. Run Django (<4.2.7/4.1.13/3.2.23) on Windows with admin login form.
2. Intercept POST to admin login in Burp.
3. Set username to >1,000,000 invalid Unicode chars e.g. `¾` repeated.
4. Submit; observe ~4.4s per request.
5. Send 20 concurrent requests; observe ~60s waits and 504 gateway timeouts.
**How found:** Noticed ASCII input was instant but large invalid Unicode input was slow; hypothesized normalization cost and tested with repeated `¾` under concurrency.
**Exploitation:** Unauthenticated attacker sends many concurrent oversized-Unicode login POSTs to exhaust worker CPU on Windows, causing gateway timeouts and DoS.
**Insight:** When a field normalizes before validating length, test oversized Unicode (NFKC/NFKD) inputs on Windows—normalization cost scales with input length and can be a CPU DoS even when validation would reject it.

