Django Access Control Bypass possibly leading to SSRF, RFI, and LFI attacks
Published 10 Jun 2021 · Updated 20 Sept 2024
Is your project on an affected django?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=2.2a1 <2.2.24
- Fixed in
- 2.2.24
pip install 'django>=2.2.24'- Affected
- >=3.0a1 <3.1.12
- Fixed in
- 3.1.12
pip install 'django>=3.1.12'- Affected
- >=3.2a1 <3.2.4
- Fixed in
- 3.2.4
pip install 'django>=3.2.4'Details
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+..) .
Is GHSA-p99v-5w3c-jqq9 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected django, and gives you the command that fixes it.
More advisories for django
- HighCVE-2026-15307Django GeoDjango spatial lookups allow file writes and outbound requests through GDAL raster parsing · 4 Aug 2026
- MediumCVE-2026-15830Django GeoDjango vulnerable to denial of service through deeply nested geometry collections · 4 Aug 2026
- MediumCVE-2026-53878Django: DomainNameValidator permits newline characters that may enable HTTP header injection · 7 Jul 2026
- MediumCVE-2026-53877 Django: GDALRaster may over-read heap memory when constructed from bytes · 7 Jul 2026
- LowCVE-2026-48588Django: cache middleware may expose private responses when unrelated request cookies are present · 7 Jul 2026
- LowCVE-2026-8404Django: UpdateCacheMiddleware may disclose cached responses due to case-sensitive Cache-Control handling · 3 Jun 2026
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2021-33571
- Linkgithub.com/django/django/commit/203d4ab9ebcd72fc4d6eb7398e66ed9e474e118e
- Linkgithub.com/django/django/commit/9f75e2e562fa0c0482f3dde6fc7399a9070b4a3d
- Linkgithub.com/django/django/commit/f27c38ab5d90f68c9dd60cabef248a570c0be8fc
- Linkdocs.djangoproject.com/en/3.2/releases/security
- Advisorygithub.com/advisories/GHSA-p99v-5w3c-jqq9
- Packagegithub.com/django/django
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-99.yaml
- Linkgroups.google.com/g/django-announce/c/sPyjSKMi8Eo
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV
- Linksecurity.netapp.com/advisory/ntap-20210727-0004
- Linkwww.djangoproject.com/weblog/2021/jun/02/security-releases
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.