PyPI package

Django 4.0.9 vulnerabilities, and the version that fixes all of them

Django 4.0.9 has 16 known vulnerabilities (7 rated high or critical); 5.2.17 fixes all of them. Django 4.0 reached end of life on Apr 1, 2023 and gets no more security fixes. Move to Django 5.2 (LTS).

PyPI (opens in a new tab) describes it as “A high-level Python web framework that encourages rapid development and clean, pragmatic design.”

Known vulnerabilities
16
7 rated high or critical
Released
Feb 1, 2023
Latest is 6.1.2
Django 4.0 support
End of life
Since Apr 1, 2023
Licence
BSD-3-Clause
OpenSSF Scorecard
6.7/10
django/django (opens in a new tab)
Pulls in
2 packages
Resolved by deps.dev

What to upgrade to

5.2.17 is the closest release with no known vulnerabilities.

  • 4.2.30

    Newest 4.x release. Released Apr 7, 2026.

    8 known vulnerabilities, worst rated warning
  • 5.2.17Upgrade to this

    Fixes all 16 known vulnerabilities. Released Aug 4, 2026.

    No known vulnerabilities
  • 6.1.2

    Latest release. Released Oct 6, 2026.

    No known vulnerabilities

5.2.17 came out on Aug 4, 2026. A coding agent trained before then doesn’t know it exists, so it may suggest an older release. AI knowledge cutoff dates

Hand the fix to your coding agent

One task with the upgrade, the file to change and why. Paste it into Claude Code, Cursor or Codex.

Findings

Every advisory for Django 4.0.9

Known exploited first (CISA KEV), then by how likely they are to be exploited (FIRST EPSS), then by severity. Each id links to its OSV.dev record.

  1. CriticalCVE-2023-24580 on OSV.dev (opens in a new tab)GHSA-2hrw-hx67-34x6EPSS: top 1%

    Resource exhaustion in Django

    Fixed in 4.0.10. Published Feb 15, 2023.

  2. CriticalCVE-2025-57833 on OSV.dev (opens in a new tab)GHSA-6w2r-r2m5-xq5wEPSS: top 3%

    Django is subject to SQL injection through its column aliases

    Fixed in 4.2.24. Published Sep 8, 2025.

  3. CriticalCVE-2025-64459 on OSV.dev (opens in a new tab)GHSA-frmv-pr5f-9mcrEPSS: top 3%

    Django vulnerable to SQL injection via _connector keyword argument in QuerySet and Q objects.

    Fixed in 4.2.26. Published Nov 5, 2025.

  4. CriticalCVE-2023-36053 on OSV.dev (opens in a new tab)GHSA-jh3w-4vvf-mjgrEPSS: top 13%

    Django has regular expression denial of service vulnerability in EmailValidator/URLValidator

    Fixed in 4.1.10. Published Jul 3, 2023.

  5. CriticalCVE-2025-64458 on OSV.dev (opens in a new tab)GHSA-qw25-v68c-qjf3EPSS: top 21%

    Django has a denial-of-service vulnerability in HttpResponseRedirect and HttpResponsePermanentRedirect on Windows

    Fixed in 4.2.26. Published Nov 5, 2025.

  6. CriticalCVE-2023-31047 on OSV.dev (opens in a new tab)GHSA-r3xc-prgr-mg9pEPSS: top 29%

    Django bypasses validation when using one form field to upload multiple files

    Fixed in 4.1.9. Published May 7, 2023.

  7. CriticalCVE-2026-15307 on OSV.dev (opens in a new tab)GHSA-wvqv-fj8w-qmhmEPSS: top 35%

    Django GeoDjango spatial lookups allow file writes and outbound requests through GDAL raster parsing

    Fixed in 5.2.17. Published Aug 4, 2026.

  8. WarningCVE-2026-15830 on OSV.dev (opens in a new tab)GHSA-q238-5cxm-5c9hEPSS: top 35%

    Django GeoDjango vulnerable to denial of service through deeply nested geometry collections

    Fixed in 5.2.17. Published Aug 4, 2026.

  9. WarningCVE-2024-45231 on OSV.dev (opens in a new tab)GHSA-rrqc-c2jx-6jgvEPSS: top 45%

    Django allows enumeration of user e-mail addresses

    Fixed in 4.2.16. Published Oct 8, 2024.

  10. WarningCVE-2025-48432 on OSV.dev (opens in a new tab)GHSA-7xr5-9hcq-chf9EPSS: top 46%

    Django Improper Output Neutralization for Logs vulnerability

    Fixed in 4.2.22. Published Jun 5, 2025.

  11. WarningCVE-2026-53877 on OSV.dev (opens in a new tab)GHSA-crhf-3pfg-w68wEPSS: top 57%

    Django: GDALRaster may over-read heap memory when constructed from bytes

    Fixed in 5.2.16. Published Jul 7, 2026.

  12. LowCVE-2026-48588 on OSV.dev (opens in a new tab)GHSA-3h9f-r86x-qvjxEPSS: top 65%

    Django: cache middleware may expose private responses when unrelated request cookies are present

    Fixed in 5.2.16. Published Jul 7, 2026.

  13. LowCVE-2026-8404 on OSV.dev (opens in a new tab)GHSA-8cjm-8mp7-r2xfEPSS: top 65%

    Django: UpdateCacheMiddleware may disclose cached responses due to case-sensitive Cache-Control handling

    Fixed in 5.2.15. Published Jun 3, 2026.

  14. LowCVE-2026-48587 on OSV.dev (opens in a new tab)GHSA-923m-gv2p-w5qpEPSS: top 65%

    Django: has_vary_header may expose cached responses when Vary values contain whitespace

    Fixed in 5.2.15. Published Jun 3, 2026.

  15. WarningCVE-2026-53878 on OSV.dev (opens in a new tab)GHSA-8qcx-xf44-272xEPSS: top 76%

    Django: DomainNameValidator permits newline characters that may enable HTTP header injection

    Fixed in 5.2.16. Published Jul 7, 2026.

  16. LowCVE-2026-6873 on OSV.dev (opens in a new tab)GHSA-h7pc-vwp9-298gEPSS: top 81%

    Django: signed cookies are vulnerable to salt namespace collisions

    Fixed in 5.2.15. Published Jun 3, 2026.

Is Django the only one?

Paste a public GitHub repo or drop your requirements.txt or pyproject.toml and see every vulnerable, end-of-life or deprecated dependency, with one fix task. Free, no sign-up.

Check your whole repo

How this page is checked

StackPrism asks OSV.dev which advisories affect exactly Django 4.0.9, merges duplicates filed under several ids, and ranks them with CISA’s Known Exploited Vulnerabilities list and FIRST EPSS. Release dates and deprecation come from deps.dev and PyPI, support dates from endoflife.date. No AI writes this page: every sentence comes from that data, refreshed every few hours.

Last checked against PyPI, OSV.dev, deps.dev, CISA KEV, FIRST EPSS and endoflife.date.