Django: Loop with Unreachable Exit Condition
CVE-2022-23833 is a high-severity loop with unreachable exit condition vulnerability in Django, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists versions 2.2.27, 3.2.12, 4.0.2 as the first without the flaw, so updating Django to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 49.5% chance of exploitation within 30 days, which is in the top 1.09% of all scored CVEs.
EPSS places it among the vulnerabilities most likely to be exploited soon.
What to do
- Update Django to 2.2.27 or 3.2.12 or 4.0.2, whichever matches your release line, or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Django | Django | 2.2 up to, but not including, 2.2.27; 3.2 up to, but not including, 3.2.12; 4.0 up to, but not including, 4.0.2 | 2.2.27, 3.2.12, 4.0.2 |
| Fedora Project | Fedora | 34; 35 | Not stated |
| Debian | Debian Linux | 11.0 | Not stated |
Version data comes from NVD's product matching. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- NoneNothing can be modified.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | NVD |
| CVSS 2.0 | 5.0 | Medium | NVD |
Official description
An issue was discovered in MultiPartParser in Django 2.2 before 2.2.27, 3.2 before 3.2.12, and 4.0 before 4.0.2. Passing certain inputs to multipart forms could result in an infinite loop when parsing files.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Loop with Unreachable Exit Condition
The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.
More Loop with Unreachable Exit Condition vulnerabilities (CWE-835)
Timeline
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- docs.djangoproject.com/en/4.0/releases/security/Third Party Advisory
- github.com/django/django/commit/c477b761804984c932704554ad35f78a2e230c6a
- github.com/django/django/commit/d16133568ef9c9b42cb7a08bdf9ff3feec2e5468
- github.com/django/django/commit/f9c7d48fdd6f198a6494a9202f90242f176e4fc9
- djangoproject.com/weblog/2022/feb/01/security-releases/Third Party Advisory
Third-party and government advisories
- security.netapp.com/advisory/ntap-20220221-0003/Third Party Advisory
- debian.org/security/2022/dsa-5254Third Party Advisory
Other references
Other vulnerabilities in Django
- 8.8 High severity
- 9.8 Critical severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 8.5 High severity
Recent Loop with Unreachable Exit Condition vulnerabilities
- 7.5 High severity
- 7.5 High severity
Spotted an error? Tell us.