What’s Vulnerable › Vulnerabilities
CVE-2021-33571: Django Access Control Bypass possibly leading to SSRF, RFI, and LFI attacks
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 5.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-06-08 · updated 2026-06-17
- Weakness: CWE-918
Description
In Django 2.2 before 2.2.24, 3.x before 3.1.12, and 3.2 before 3.2.4, URLValidator, validate_ipv4_address, and validate_ipv46_address do not prohibit leading zero characters in octal literals. This may allow a bypass of access control that is based on IP addresses. (validate_ipv4_address and validate_ipv46_address are unaffected with Python 3.9.5+..) .
Affected products
- Django: from 2.2 before 2.2.24; from 3.0 before 3.1.12; from 3.2 before 3.2.4 — fixed in 2.2.24, 3.1.12, 3.2.4
- Fedoraproject Fedora: 35
- Pypi Django: from 2.2 before 2.2.24; from 3.0 before 3.1.12; from 3.2 before 3.2.4; 2.2, 2.2.1, 2.2.10, 2.2.11, 2.2.12, 2.2.13 (+52) — fixed in 2.2.24, 3.1.12, 3.2.4
How to fix
Upgrade to a fixed version: Django 2.2.24, 3.1.12, 3.2.4; Pypi Django 2.2.24, 3.1.12, 3.2.4. Check the vendor advisory for mitigations.
References
- https://docs.djangoproject.com/en/3.2/releases/security/
- https://github.com/django/django/commit/203d4ab9ebcd72fc4d6eb7398e66ed9e474e118e
- https://github.com/django/django/commit/9f75e2e562fa0c0482f3dde6fc7399a9070b4a3d
- https://github.com/django/django/commit/f27c38ab5d90f68c9dd60cabef248a570c0be8fc
- https://groups.google.com/g/django-announce/c/sPyjSKMi8Eo
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/
- https://security.netapp.com/advisory/ntap-20210727-0004/
- https://www.djangoproject.com/weblog/2021/jun/02/security-releases/
- https://docs.djangoproject.com/en/3.2/releases/security/
- https://github.com/django/django/commit/203d4ab9ebcd72fc4d6eb7398e66ed9e474e118e
- https://github.com/django/django/commit/9f75e2e562fa0c0482f3dde6fc7399a9070b4a3d
- https://github.com/django/django/commit/f27c38ab5d90f68c9dd60cabef248a570c0be8fc
Get alerted when CVE-2021-33571 or the next vulnerability affects your stack