Django Might Allow CSRF Requests via URL Verification
Published 14 May 2022 · Updated 16 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
- <1.2.7
- Fixed in
- 1.2.7
pip install 'django>=1.2.7'- Affected
- >=1.3 <1.3.1
- Fixed in
- 1.3.1
pip install 'django>=1.3.1'Details
The verify_exists functionality in the URLField implementation in Django before 1.2.7 and 1.3.x before 1.3.1 originally tests a URL's validity through a HEAD request, but then uses a GET request for the new target URL in the case of a redirect, which might allow remote attackers to trigger arbitrary GET requests with an unintended source IP address via a crafted Location header.
Is GHSA-wxg3-mfph-qg9w 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-2011-4138
- Linkgithub.com/django/django/commit/1a76dbefdfc60e2d5954c0ba614c3d054ba9c3f0
- Linkgithub.com/django/django/commit/7268f8af86186518821d775c530d5558fd726930
- Linkbugzilla.redhat.com/show_bug.cgi?id=737366
- Packagegithub.com/django/django
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2011-3.yaml
- Linkhermes.opensuse.org/messages/14700881
- Linkwww.djangoproject.com/weblog/2011/sep/09
- Linkwww.djangoproject.com/weblog/2011/sep/10/127
- Linkopenwall.com/lists/oss-security/2011/09/11/1
- Linkopenwall.com/lists/oss-security/2011/09/13/2
- Linkwww.debian.org/security/2011/dsa-2332
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.