Django Access Control Bypass possibly leading to SSRF, RFI, and LFI attacks
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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | django | >= 2.2a1, < 2.2.24, >= 3.0a1, < 3.1.12, >= 3.2a1, < 3.2.4 | 2.2.24, 3.1.12, 3.2.4 |
References
- https://groups.google.com/g/django-announce/c/sPyjSKMi8Eo
- https://docs.djangoproject.com/en/3.2/releases/security/
- https://www.djangoproject.com/weblog/2021/jun/02/security-releases/
- https://github.com/advisories/GHSA-p99v-5w3c-jqq9
- https://nvd.nist.gov/vuln/detail/CVE-2021-33571
- https://github.com/django/django/commit/203d4ab9ebcd72fc4d6eb7398e66ed9e474e118e
- https://github.com/django/django/commit/9f75e2e562fa0c0482f3dde6fc7399a9070b4a3d
- https://github.com/django/django/commit/f27c38ab5d90f68c9dd60cabef248a570c0be8fc
- https://docs.djangoproject.com/en/3.2/releases/security
- https://github.com/django/django
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-99.yaml
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV
- https://security.netapp.com/advisory/ntap-20210727-0004
- https://www.djangoproject.com/weblog/2021/jun/02/security-releases
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N- Weakness (CWE)
CWE-918- Platform
- Python (PyPI)
- Package
django- Disclosed
- 08.06.2021
- Updated
- 11.10.2026 11:20
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2021-99 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-p99v-5w3c-jqq9 - CC BY 4.0
Vulnerability history: django
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 162
- First → latest
- 10.2007 08.2026
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- Critical 16
- High 65
- Medium 63
- Low 18
Disclosures per year
- 2017: 3
- 2018: 5
- 2019: 11
- 2020: 6
- 2021: 8
- 2022: 14
- 2023: 7
- 2024: 14
- 2025: 12
- 2026: 26
earlier: 56
-
Django Access Control Bypass possibly leading to SSRF, RFI, and LFI attacks this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.