CVE-2013-0306: Django is vulnerable to Denial of Service attack in formset
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.6737%
CWE
Published
5/5/2022
Updated
9/18/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
Django | pip | >= 1.3, < 1.3.6 | 1.3.6 |
Django | pip | >= 1.4, < 1.4.4 | 1.4.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the lack of a hard limit on the number of forms in a formset. The patch introduced DEFAULT_MAX_NUM and modified _construct_forms to use min(self.total_form_count(), self.absolute_max), capping the forms created. The original code in _construct_forms used xrange(self.total_form_count()) without constraints, and formset_factory allowed max_num=None, making the system rely on attacker-controlled input. These functions directly handled formset creation without enforcing limits, enabling the DoS vector.