# Django SQL injection in range and in lookups (CVE-2026-132092)

Detection pack 1.0.0 for the 2 Dec 2026 Django security releases (6.1.4, 6.0.11 and 5.2.20). HubSpot Files slot: `django-cve-2026-132092-pack-v1`.

The lead issue is CVE-2026-132092. CVE.org rates it CVSS 3.1 9.8 Critical (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`) and CVSS 4.0 9.3 Critical (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`). Django rates it "high" under its own security policy. Only this CVE in the batch has a vendor or CNA score of 9.0 or higher. The same releases also fix six other issues, including PostGIS RasterField server-side file-write CVE-2026-124827 (Django "high"; CVE.org CVSS 3.1 8.8 High and CVSS 4.0 8.7 High).

Research is credited to security researchers only. Name no reporter, firm, team or programme.

no exploitation reported by Django as of 2 Dec 2026; not listed in CISA KEV as of 2 Dec 2026 (catalogue 2026.11.30). KEV due dates bind US federal agencies only (BOD 26-04). Patch now regardless.

The KQL in this pack has NOT been run against a live tenant. Parsed offline with Kusto.Language against `tests/schema/*.cols` (Microsoft Learn column lists). Test it in your own workspace before you rely on it.

## Verified facts

Sources: the official Django weblog post dated 2 Dec 2026, the Django security archive, CVE.org records for all seven CVEs, NVD records for CVE-2026-132092 and CVE-2026-124827, the live CISA KEV JSON, and the official `django/__init__.py` files and git tags on https://github.com/django/django.

- Affected supported versions, per the blog and CVE.org: Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20. The blog also lists Django main as affected and patched. CVE.org defaultStatus is unaffected outside the listed ranges.
- CVE.org states: "Earlier, unsupported Django series (such as 5.1.x, 5.0.x, and 4.2.x) were not evaluated and may also be affected."
- Fixed releases, issued 2 Dec 2026: Django 6.1.4, 6.0.11 and 5.2.20. Official release notes: https://docs.djangoproject.com/en/dev/releases/6.1.4/, https://docs.djangoproject.com/en/dev/releases/6.0.11/ and https://docs.djangoproject.com/en/dev/releases/5.2.20/. Tags `6.1.4`, `6.0.11` and `5.2.20` exist on https://github.com/django/django. Official `django/__init__.py` uses `VERSION = (6, 1, 4, "final", 0)` (and the matching tuples for 6.0.11 and 5.2.20) plus `__version__ = get_version(VERSION)`.
- Published: CVE-2026-132092 was published on CVE.org at 2026-12-02T13:21:23.058Z (13:21 GMT) and on NVD at 2026-12-02T14:17:12.123Z (14:17 GMT). NVD `vulnStatus` for CVE-2026-132092 and CVE-2026-124827 is Deferred as of that NVD timestamp.
- Mechanism, in the official blog's words: "The range and in lookups were subject to SQL injection in queries involving aliases or key transforms containing percent signs." "The __range flaw required incorrectly using more than two right-hand side values." "The __in flaw required a bilateral transform." "The range lookup now requires exactly two right-hand side values." "Note that using percent signs in column aliases and key transforms was deprecated in Django 6.0 and is scheduled for removal in Django 2028."
- CWE for CVE-2026-132092: CWE-89.
- The same blog post addresses six other CVEs (see the table). For CVE-2026-124827 the blog states that "Depending on the raster driver, this could enable remote code execution." "RasterField now defaults editable to False", raises GDALException for a dict or JSON string specifying a non-default driver unless wrapped in GDALRaster, "Server-side request forgery is still possible if untrusted input is assigned to RasterField", "Geometry fields were not affected." and "RasterField is only implemented on PostGIS." For CVE-2026-125673, "Existing cached responses are not invalidated, so users should clear any potentially affected caches after upgrading." CVE-2026-127929 "is a special case of CVE-2010-4534 that regressed in Django 5.0.3."
- Django security policy severity levels: https://docs.djangoproject.com/en/dev/internals/security/#security-issue-severity-levels. Security archive: https://docs.djangoproject.com/en/dev/releases/security/. Official blog: https://www.djangoproject.com/weblog/2026/dec/02/security-releases/.
- CISA KEV catalogue version 2026.11.30, dateReleased 2026-11-30T19:44:39.2733Z (19:44 GMT), 1810 entries. None of the seven CVEs in this release are listed. KEV: https://www.cisa.gov/known-exploited-vulnerabilities-catalog. BOD 26-04: https://www.cisa.gov/news-events/directives/bod-26-04-implementation-guidance-prioritizing-security-updates-based-risk.
- CVE.org: https://www.cve.org/CVERecord?id=CVE-2026-132092 and https://www.cve.org/CVERecord?id=CVE-2026-124827. NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-132092 and https://nvd.nist.gov/vuln/detail/CVE-2026-124827.

### 2 Dec 2026 Django security release (all 7 CVEs)

Django ratings are the project's own policy labels (high, moderate, low). CVSS qualitative labels are from CVE.org. Only CVE-2026-132092 is Critical (CVSS 3.1 9.8 and CVSS 4.0 9.3).

| CVE | Issue | Django rating | CVSS 3.1 | CVSS 4.0 |
| --- | --- | --- | --- | --- |
| CVE-2026-132092 | Potential SQL injection in range and in lookups | high | 9.8 Critical | 9.3 Critical |
| CVE-2026-124827 | Server-side file-write via RasterField assignment | high | 8.8 High | 8.7 High |
| CVE-2026-115868 | Potential cross-site scripting vulnerability in truncatechars_html | moderate | 6.1 Medium | 5.1 Medium |
| CVE-2026-125673 | Potential cache poisoning via dot segments in request paths | low | 3.7 Low | 6.3 Medium |
| CVE-2026-119642 | Information leakage in admin changelist via "pk" alias for OneToOneField | low | 2.7 Low | 5.1 Medium |
| CVE-2026-127929 | Information leakage in admin changelist via reverse relations | low | 2.7 Low | 5.1 Medium |
| CVE-2026-132809 | Heap buffer overflow in OGRGeometry.wkb | low | 5.3 Medium | 6.9 Medium |

## What is in this pack

- `kql/django-cve-2026-132092-hunting.kql`: 11 hunts labelled OUR PATTERN. Web and WAF or proxy review of percent-sign and range or in tokens, inbound TCP 80 and 443, syslog SQL or BETWEEN or IN wording, shells and unexpected file writes from `python`, `python3`, `gunicorn`, `uwsgi`, `uvicorn` or `celery` (file-write coverage also applies to CVE-2026-124827), and outbound connections from Django hosts. Application, WAF, database and file-event field names and line formats are UNVERIFIED. Replace the `DjangoHosts` and `MgmtPrefixes` placeholders (RFC 5737 ranges) with your values.
- `sigma/`: 7 experimental Sigma rules with the same caveats, plus conversions under `sigma/converted/`.
- `scripts/check-django-cve-2026-132092.sh` and `scripts/Check-DjangoCve2026132092.ps1`: read-only version checkers with byte-for-byte output parity. They accept `--version`, `--version-file`, `--root` or `--csv`. They can parse a given `django/__init__.py`, `METADATA`/`PKG-INFO` or `requirements.txt` without executing Python. They never open `settings.py`, `local_settings.py`, `secrets.py`, `credentials.py` or `.env` files, never use the network, never write files, and never print secrets. Non-version input is shown as `(not shown)`.

Verdicts:

- AFFECTED: 5.2.0 through 5.2.19, 6.0.0 through 6.0.10, 6.1.0 through 6.1.3, and pre-releases of the fixed versions (for example 5.2.20rc1 or 6.1.4a1).
- FIXED: 5.2.20, 6.0.11 or 6.1.4 (final) and later micro versions on those series, plus later supported series (6.2 and above), because the official blog says patches were applied to main as well as 6.1, 6.0 and 5.2.
- REVIEW: unsupported series before 5.2 (including 4.2.x, 5.0.x and 5.1.x), unknown series such as 5.3, and unparseable strings. For those older series the checker prints the CVE.org "not evaluated" note.

| 0 | FIXED |
| 2 | AFFECTED |
| 3 | REVIEW |
| 5 | usage or read error |

CSV header must be `host,version`. The worst row wins (AFFECTED over REVIEW over FIXED). `--root DIR` reads only `DIR/django/__init__.py`, `DIR/METADATA`, `DIR/PKG-INFO` or `DIR/requirements.txt` (no tree walk).

## Manual checks (no payloads)

1. Inventory Django deployments on 5.2, 6.0 and 6.1 (and any unsupported 4.2, 5.0 or 5.1 apps that may still be in use).
2. Compare the installed version with 5.2.20, 6.0.11 or 6.1.4 using the checkers, `django-admin --version`, a pinned `requirements.txt`, or a saved `django/__init__.py` or package METADATA file. Do not open `settings.py` or `.env` files (they hold `SECRET_KEY` and database passwords). Do not run untrusted Python to print the version.
3. Upgrade to 5.2.20, 6.0.11 or 6.1.4 promptly. After upgrading, clear caches if you used Django's cache middleware or `cache_page` (CVE-2026-125673). Review RasterField usage if you use PostGIS (CVE-2026-124827).
4. Review WAF, proxy, application and database logs for anomalous `range` or `in` lookups, unexpected percent signs in aliases or key transforms, SQL errors, unexpected file writes by Python or WSGI processes, and unusual outbound connections. Treat hunt hits as a review list, not as proof of exploitation.
5. If compromise is suspected, contain the affected app, investigate data access and file writes, rotate credentials, and rebuild from a known-good release.

## Differences from the original flag

1. The original flag wrote "Django 2028" for the deprecation removal. That wording is exact in the official blog: "scheduled for removal in Django 2028."
2. NVD lists `vulnStatus` as Deferred for CVE-2026-132092 and CVE-2026-124827 as of 2 Dec 2026 14:17 GMT (the original flag did not mention NVD status).
3. CVE-2026-124827 is CVSS 3.1 8.8 High and CVSS 4.0 8.7 High on CVE.org, not a 9.0 or higher score. The original flag correctly called it Django-rated high and did not treat it as a 9.0 or higher issue.
4. Several of the other five CVEs have a Django policy label that differs from the CVSS 4.0 qualitative label (for example CVE-2026-125673 is Django low and CVSS 4.0 6.3 Medium; CVE-2026-119642 and CVE-2026-127929 are Django low and CVSS 4.0 5.1 Medium; CVE-2026-132809 is Django low, CVSS 3.1 5.3 Medium and CVSS 4.0 6.9 Medium). Only CVE-2026-132092 is Critical (CVSS 3.1 9.8 and CVSS 4.0 9.3).
5. Official version format is the `VERSION` tuple in `django/__init__.py`. Tags `6.1.4`, `6.0.11` and `5.2.20` exist on the official GitHub repository.
6. Reporter, staff and organisation names that appear in the blog and CVE records are not used in this pack. Research is credited to security researchers only.

## Notes for the web page

1. Use slot `django-cve-2026-132092-pack-v1` exactly.
2. Keep Django's own "high" rating clearly distinct from CVE.org's CVSS 3.1 9.8 Critical and CVSS 4.0 9.3 Critical. Only call Critical next to a verified 9.0 or higher score.
3. Do not apply a 9.0 or higher label to CVE-2026-124827 (it is 8.8 High / 8.7 High). Include it as a related issue in the same 2 Dec 2026 release.
4. Credit security researchers only. Name no reporter, firm, team or programme.
5. Use the official deprecation sentence in full, including "scheduled for removal in Django 2028" (that year is official, not a typo).
6. Use this exploitation sentence: no exploitation reported by Django as of 2 Dec 2026; not listed in CISA KEV as of 2 Dec 2026 (catalogue 2026.11.30). Do not write a claim that exploitation has been ruled out.
7. NVD status for CVE-2026-132092 and CVE-2026-124827 is Deferred as of 2 Dec 2026 14:17 GMT, not a completed NVD analysis.
8. State that earlier unsupported series (5.1.x, 5.0.x, 4.2.x) were not evaluated by Django or CVE.org and may also be affected.
9. Include the seven-CVE table, with Django ratings and both CVSS 3.1 and 4.0 scores. Mention the cache-clear note for CVE-2026-125673.
10. RasterField (CVE-2026-124827) is PostGIS only; geometry fields were not affected; server-side request forgery is still possible if untrusted input is assigned after the patch, per the blog.
11. CVE-2026-127929 is a special case of CVE-2010-4534 that regressed in Django 5.0.3.
12. The checkers never open `settings.py` or `.env` files and never execute Python.
13. The KQL in this pack has NOT been run against a live tenant. KEV due dates bind US federal agencies only (BOD 26-04). Patch now regardless.

## Unverified

- WAF, proxy, syslog, application and database field names and line formats used in the hunts.
- Whether a given Django host exposes TCP 80 or 443, and which process names appear in your telemetry beyond the official list (`python`, `python3`, `gunicorn`, `uwsgi`, `uvicorn`, `celery`).
- Destination paths for RasterField or other application file writes.
- Default log paths for Django, gunicorn, uWSGI, uvicorn or celery.
- Whether a specific unsupported 4.2, 5.0 or 5.1 deployment is actually vulnerable (CVE.org: not evaluated).
- The KQL in this pack has NOT been run against a live tenant.

Every hunt and Sigma rule is OUR PATTERN. Do not treat hits as confirmed exploitation of CVE-2026-132092 or CVE-2026-124827.
