Vulnerability advisory

GHSA-6w2r-r2m5-xq5w

Django is subject to SQL injection through its column aliases

Published Updated OSV record ↗

Also known as BIT-django-2025-57833CVE-2025-57833PYSEC-2025-105

Severity
  • CVSS 3.xCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N

Affected versions

AffectedFixed in
All versions before 4.2.244.2.24Advisories →
Also listed as affected (360)
5.0a1 to before 5.1.125.1.12Advisories →
Also listed as affected (33)
5.2a1 to before 5.2.65.2.6Advisories →
Also listed as affected (9)

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().

References

  • Codex
  • Claude Code
  • VS Code
  • GitHub Copilot
  • Cursor
  • Cline
  • Windsurf
  • Google Anti-gravity
  • OpenCode
  • Pi
  • Gemini CLI
  • Hermes Agent
  • Zed
  • Junie
  • Qwen Code
  • Kiro
  • Kilo Code
  • Factory Droid

Set up GitHits for your agents

Run this command:

<> bash
npx githits@latest init

What happens next:

  1. Opens your browser to authorize GitHits
  2. Asks whether to set up GitHits at the user or project level
  3. Detects your supported AI coding tools
  4. Lets you choose which tools to configure
  5. Configures the selected tools