Django 6.1.3 Security Update: Upgrade 6.0 and 5.2 LTS Too

The Django 6.1.3 security update, released on November 3, 2026 together with 6.0.10 and 5.2.19, fixes six CVEs: one rated moderate (an SSRF in GeoDjango's GeoJSON handling) and five rated low. Every supported branch is affected, so upgrade to 6.1.3, 6.0.10 or 5.2.19 now. If you use per-view or site-wide caching, expect a short burst of cache misses after the deploy, because cache keys for Vary headers changed.

Written November 7, 2026. Facts checked on November 7, 2026 (KST) against the Django project's security release announcement (November 3, 2026), the official release notes for 6.1.3, 6.0.10 and 5.2.19, and the Django supported versions table. The commands are standard pip, uv, Poetry and Django management commands. They were not run against a production project for this post.

What changed in the Django 6.1.3 security update

The Django team published three patch releases on November 3, 2026. All three are security releases. 6.1.3 also carries a few bug fixes and adds Python 3.15 compatibility.

Django 6.1.3 security update card listing the six CVEs fixed on November 3, 2026: GeoJSON CRS SSRF rated moderate, plus base64 upload memory use, geometry log injection, Vary cache key collision, admin password hash display and SpatialReference string SSRF rated low
Six CVEs in the November 3 releases
CVEAreaWhat it allowsSeverity
CVE-2026-111362GeoDjango (GeoJSON crs)SSRF or local file read through GDALModerate
CVE-2026-108147MultiPartParserBase64 uploads buffered fully in memoryLow
CVE-2026-111211GeometryField widgetsLog injection with control charactersLow
CVE-2026-113593cache_page(), UpdateCacheMiddlewareCached private response served to the wrong userLow
CVE-2026-113733Admin, custom user modelsView-only admins see the full password hashLow
CVE-2026-114582GeoDjango SpatialReferenceSSRF or file read from string inputLow

Three of the six CVEs are in django.contrib.gis. If you do not use GeoDjango, the ones that can still touch you are the upload memory bug, the cache key bug and the admin password hash bug.

The six CVEs in plain terms

  • GeoJSON CRS SSRF (CVE-2026-111362). A GeoJSON geometry can carry a crs member that points to an external URL. GDAL resolved it, so a user who submits GeoJSON could make your server fetch a URL or read a file as the Django process user. Spatial lookups, GeometryField and GEOSGeometry now reject external CRS references. DataSource and LayerMapping still accept them, because they are meant for trusted data.
  • Base64 upload memory (CVE-2026-108147). A multipart upload with Content-Transfer-Encoding: base64 was buffered entirely in memory, ignoring FILE_UPLOAD_MAX_MEMORY_SIZE. Large crafted uploads could push memory use up.
  • Geometry log injection (CVE-2026-111211). Invalid values submitted to GeometryField were logged without escaping, so newlines or ANSI escape sequences could fake log lines.
  • Vary cache key collision (CVE-2026-113593). A request that omitted a header listed in Vary and one that sent it empty got the same cache key. A cached private response could reach the wrong requester.
  • Admin password hash (CVE-2026-113733). View-only admin users could see the full password hash on a custom user model that is not AUTH_USER_MODEL, or when AUTH_USER_MODEL inherits password from a concrete parent through multi-table inheritance. This one is fixed in 6.1 and 6.0 only. The 5.2.19 release notes do not list it.
  • SpatialReference string SSRF (CVE-2026-114582). Strings passed to SpatialReference, the transform() methods and several srs/srid setters went to GDAL, which could resolve URLs and file paths.

Which Django versions need the patch

The announcement lists Django main, 6.1, 6.0 and 5.2 as affected. Those are also the only supported release series. Django 5.1 and 4.2 LTS no longer get security fixes, so they are affected by default and will not receive a patch.

Django 6.1.3 security update version map card: 6.1 moves to 6.1.3, 6.0 to 6.0.10, 5.2 LTS to 5.2.19, while 5.1 and 4.2 LTS are out of support and must upgrade to a supported series
Where your project stands
SeriesFixed releaseSecurity support endsAction
6.16.1.3Dec 31, 2027Upgrade now
6.06.0.10Apr 30, 2027Upgrade now
5.2 LTS5.2.19Apr 30, 2028Upgrade now
5.1, 4.2 LTS and olderNoneAlready endedMove to 5.2.19 or newer

Support dates come from the endoflife.date Django table, which mirrors the Django project's supported versions page. 4.2 LTS reached the end of security support on April 7, 2026.

Check your environment

Two things to check per project: the installed Django version and whether the changed code paths are in use.

Django 6.1.3 security update check card with three steps: print the installed Django version, search the code for cache_page, UpdateCacheMiddleware and django.contrib.gis, and print the GDAL version if GeoDjango is installed
Three checks per project

1. Print the installed Django version

Run this inside the project's virtual environment or container:

python -m django --version
pip show django | grep -i '^version'

For a running container, use your own image or service name:

docker compose exec <YOUR_WEB_SERVICE> python -m django --version

Any version below the fixed release for its series needs the update: below 6.1.3 on 6.1, below 6.0.10 on 6.0, below 5.2.19 on 5.2.

If you use pip-audit in CI, it reads the same data from the Python packaging advisory database. Run it after the database has picked up the new CVEs:

pip install pip-audit
pip-audit -r requirements.txt

2. Find the code paths the CVEs touch

grep -rnE "cache_page|UpdateCacheMiddleware|FetchFromCacheMiddleware" --include=*.py .
grep -rn "django.contrib.gis" --include=*.py .
grep -rnE "SpatialReference|GEOSGeometry|GeometryField" --include=*.py .

Hits on the first line mean the cache key change will affect you after the upgrade. Hits on the second and third mean the GeoDjango CVEs apply, and you should also check your GDAL version.

3. Check GDAL if you use GeoDjango

Full protection for CVE-2026-114582 needs GDAL 3.9 or later. Print the version GeoDjango loads:

python -c "from django.contrib.gis.gdal import gdal_version; print(gdal_version())"

After the upgrade, Django also warns about this itself. The new system check gis.W001 fires when the installed GDAL is older than 3.9.

How to upgrade Django to 6.1.3, 6.0.10 or 5.2.19

Pin the patch release inside your current series. You do not need to jump to a new feature release to get the fixes.

Django 6.1.3 security update flow: check the installed version, pin the fixed patch release for your series, run tests and manage.py check, deploy, then watch cache hit rate and GeoDjango warnings
Patch flow for a Django project
View PlantUML source
@startuml
skinparam shadowing false
skinparam defaultFontSize 14
start
:python -m django --version;
if (Supported series?) then (6.1 / 6.0 / 5.2)
  :Pin 6.1.3 / 6.0.10 / 5.2.19;
else (5.1 or older)
  :Plan move to 5.2 LTS+;
endif
:Run tests +\nmanage.py check;
:Deploy;
:Watch cache misses\nand gis.W001;
stop
@enduml

pip with requirements.txt

Change the pin in requirements.txt, then install. Use the line for your series:

SeriesLine in requirements.txt
6.1Django==6.1.3
6.0Django==6.0.10
5.2 LTSDjango==5.2.19
pip install -r requirements.txt
python -m django --version

If you prefer a range that keeps picking up future patches in the same series, use Django>=6.1.3,<6.2 (or >=6.0.10,<6.1, >=5.2.19,<5.3).

uv and Poetry

With uv:

uv add "django>=6.1.3,<6.2"
uv lock --upgrade-package django

With Poetry:

poetry add "django@~6.1.3"
poetry show django

Commit the updated lock file so CI and production install the same version.

Django 6.1.3 security update upgrade card: pin the fixed release for your series, update the lock file, run the test suite and manage.py check --deploy, deploy, then confirm the version on the server
Upgrade order

Test and deploy

python manage.py check
python manage.py check --deploy
python manage.py test

check will show gis.W001 if GeoDjango is installed with an older GDAL. check --deploy runs the production settings checks you should already have in CI. Then deploy as usual and run python -m django --version on the server or in the running container to confirm.

If you also run Python 3.15 or plan to, 6.1.3 is the first 6.1 release that adds Python 3.15 compatibility. Our Python lazy imports in 3.15 guide covers one of the 3.15 features worth testing at the same time.

After the upgrade: cache misses and GeoDjango errors

Two of the fixes change behavior on purpose. Both are documented in the release notes.

Django 6.1.3 security update behavior change card: Vary cache keys now separate absent and empty header values so old cached pages are regenerated once, and SpatialReference rejects file paths, URLs and DICT references on GDAL 3.9 or later
Two intended behavior changes

Cache keys for Vary headers

Cache keys now tell an absent header apart from an empty one, as RFC 9111 section 4.1 requires. Responses that were cached for requests that omitted a Vary header will no longer match. Django regenerates and caches them again on the next request.

What to expect: a temporary rise in cache misses and database load right after the deploy. On a busy site, deploy outside peak hours and watch your cache hit rate and database CPU for the first hour. You do not need to clear the cache by hand. Old entries simply stop matching and expire on their normal timeout.

SpatialReference and GeoJSON input

  • On GDAL 3.9+, SpatialReference no longer accepts file paths or URLs in string input.
  • DICT: references, including ESRI::, are rejected on all GDAL versions.
  • GeoJSON geometries with an external crs reference are rejected by spatial lookups, GeometryField and GEOSGeometry.

The Django docs suggest integer SRIDs for untrusted input, because they are looked up directly in the EPSG database:

from django.contrib.gis.gdal import SpatialReference

ALLOWED_SRIDS = {4326, 3857}

def safe_srs(srid: int) -> SpatialReference:
    if srid not in ALLOWED_SRIDS:
        raise ValueError("SRID not allowed")
    return SpatialReference(srid)  # integer SRID, no string parsing

On GDAL older than 3.9, compare string inputs against an allow list of the SRIDs or WKT strings you actually expect.

If something breaks after the upgrade

Django 6.1.3 security update troubleshooting card: cache hit rate drops, gis.W001 warning appears, GeoJSON form submissions fail validation, SpatialReference raises errors for file paths, and pip still installs the old version
Common problems after the change
SymptomLikely causeFix
Cache hit rate drops right after deployVary cache key change (CVE-2026-113593)Expected; entries refill on the next requests
gis.W001 in manage.py checkGDAL older than 3.9Upgrade GDAL (system package or image), or allow-list string SRS input
GeoJSON form input now fails validationExternal crs reference rejectedStrip crs on the client or use an SRID
SpatialReference("/path/file.prj") raises an errorFile paths blocked on GDAL 3.9+Read the file yourself from a trusted path, pass WKT or an SRID
python -m django --version still shows the old versionOld pin or stale lock fileCheck the pin, update the lock file, rebuild the image

If you must roll back, pin the previous release, but treat that as a short-term step. The rollback brings back all six CVEs.

Django 6.1.3 security update troubleshooting flow: if cache misses spike wait for refill, if gis.W001 appears upgrade GDAL, if GeoJSON input fails remove external crs references
Triage after the upgrade
View PlantUML source
@startuml
skinparam shadowing false
skinparam defaultFontSize 14
start
if (Cache misses spike?) then (yes)
  :Expected, let it refill;
endif
if (gis.W001 warning?) then (yes)
  :Upgrade GDAL to 3.9+;
endif
if (GeoJSON input rejected?) then (yes)
  :Drop external crs,\nuse SRID;
endif
stop
@enduml

For other patches due this month, see our Node.js security release November 2026 prep guide and the Next.js security update to 16.4.5 or 15.5.29 if you run a JavaScript frontend next to Django.

FAQ

Is the Django 6.1.3 security update urgent if I don't use GeoDjango? Yes, but less so. Without django.contrib.gis, three CVEs still apply: base64 upload memory use, the Vary cache key collision and the admin password hash display. All three are rated low. Patch in your next deploy rather than waiting for the next feature release.

Does Django 5.2.19 fix the admin password hash bug? No. The 5.2.19 release notes list five CVEs and do not include CVE-2026-113733. The announcement lists patches for that CVE on main, 6.1 and 6.0 only.

Do I need to clear my cache after upgrading? No. Old entries for requests that omitted a Vary header stop matching and are regenerated on the next request. Expect a temporary rise in cache misses.

Is Django 4.2 LTS getting a patch? No. 4.2 LTS reached the end of security support on April 7, 2026. Move to 5.2 LTS (5.2.19) or a newer series.

Are any of these CVEs known to be exploited? The Django announcement does not mention exploitation. It rates one CVE moderate and five low.

Summary

Check python -m django --version in every project and container today. On 6.1, 6.0 or 5.2, pin 6.1.3, 6.0.10 or 5.2.19, update the lock file, run manage.py check and your tests, and deploy. Expect a short dip in cache hit rate. If you use GeoDjango, also confirm GDAL 3.9 or later and use integer SRIDs for untrusted input. Projects on 5.1 or 4.2 should plan the move to 5.2 LTS, since they will not get these fixes. Next, add pip-audit to CI so the next Django security release shows up in your build before you read about it.

References

Leave a Comment