Skip to main content
Mallory
← Back to News
open-source-dependency-vulnerabilityinternet-facing-service-vulnerabilitywidely-deployed-product-advisory

SQL Injection Flaw in Django FilteredRelation Aliases

Vulnerability Disclosure · 2 sources · Updated 3mo ago · First seen Sep 22, 2025

SQL Injection Flaw in Django FilteredRelation Aliases

A disclosed vulnerability in the Django web framework, tracked as CVE-2025-57833, allows SQL injection through FilteredRelation column aliases when a suitably crafted dictionary is expanded as **kwargs into QuerySet.annotate() or QuerySet.alias(). The issue is classified as CWE-89 and affects applications that pass attacker-controlled input into those ORM methods, potentially enabling unauthorized database query manipulation.

Red Hat rated the flaw Important with a CVSS v3 score of 7.1, while noting that the NVD assigned a higher 8.1 score. Red Hat also said there was no acceptable mitigation at disclosure and identified multiple affected products and components, which were later addressed through security errata released in September and October 2025.

Why it matters

Impact assessment

CVE-2025-57833 affects Django-based applications that use FilteredRelation and pass attacker-controlled data into QuerySet.annotate() or QuerySet.alias() via expanded **kwargs. The highest risk is to internet-facing web applications and embedded Django components in enterprise platforms, including Red Hat Ansible Automation Platform and Red Hat OpenStack Platform packages listed by Red Hat.

Impact can include unauthorized database query manipulation, data disclosure, application data tampering, access-control bypass, and potentially broader compromise paths commonly associated with SQL injection. Exposure is condition-dependent rather than universal: exploitation requires unsafe application code patterns, but affected package versions should be treated as vulnerable unless explicitly fixed by vendor errata.

There is no exploitation-in-the-wild information in the provided references.

Affected entities and products

  • Django web framework
  • Applications using FilteredRelation aliases with attacker-influenced **kwargs
  • Red Hat Ansible Automation Platform 2.4 for RHEL 8 and RHEL 9
  • Red Hat Ansible Automation Platform 2.5 for RHEL 8 and RHEL 9
  • Red Hat OpenStack Platform 16.2
  • Red Hat OpenStack Platform 17.1 for RHEL 9

Severity and scope facts

  • Vulnerability: CVE-2025-57833
  • Weakness: CWE-89 Improper Neutralization of Special Elements used in an SQL Command
  • Red Hat severity: Important
  • Red Hat CVSS v3.1: 7.1
  • NVD CVSS v3.1: 8.1
  • Scope is broad across Django deployments, but practical exploitability depends on whether application code passes untrusted input into the affected ORM methods.
  • Red Hat states previous package versions in listed product streams should be assumed vulnerable unless explicitly stated otherwise.
Do you run this?See affected versions and whether adversaries are exploiting it.
Check your exposure
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

5 events · Sep 3, 2025 – Sep 22, 2025
  1. Reported Sep 22, 20251y ago

    Red Hat updates its CVE-2025-57833 record

    Red Hat last modified its CVE-2025-57833 entry, reflecting an update to the vendor advisory record for the Django SQL injection issue.

    CVE-2025-57833 - Red Hat Customer Portal
  2. Reported Sep 22, 20251y ago

    Red Hat fixes CVE-2025-57833 in OpenStack Platform

    Red Hat published RHSA-2025:17499 and RHSA-2025:17498 to remediate CVE-2025-57833 in Red Hat OpenStack Platform 16.2 and 17.1, affecting python-django20 and python-django packages.

    CVE-2025-57833 - Red Hat Customer Portal
  3. Reported Sep 22, 20251y ago

    Red Hat releases AAP 2.5 fixes for CVE-2025-57833

    Red Hat released RHSA-2025:16487 and RHSA-2025:16514 to address CVE-2025-57833 in Red Hat Ansible Automation Platform 2.5 for RHEL 8 and RHEL 9, covering automation-controller, python3.11-django, and lightspeed-related packages.

    CVE-2025-57833 - Red Hat Customer Portal
  4. Sep 22, 20251y ago

    Red Hat ships first fixes for CVE-2025-57833 in AAP 2.4

    Red Hat issued RHSA-2025:16403 and RHSA-2025:16404 to fix CVE-2025-57833 in Red Hat Ansible Automation Platform 2.4 for RHEL 8 and RHEL 9, including python3x-django, python-django, and lightspeed-related components.

    CVE-2025-57833 - Red Hat Customer Portal
  5. Sep 3, 20251y ago

    Red Hat publishes CVE-2025-57833 as public

    Red Hat made its CVE-2025-57833 entry public, describing an SQL injection vulnerability in Django involving FilteredRelation column aliases. The flaw can be triggered via a crafted dictionary expanded as **kwargs to QuerySet.annotate() or QuerySet.alias().

    CVE-2025-57833 - Red Hat Customer Portal
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →

Affected products

1 linked
Django
Do you run this?See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
Check Your Exposure
Source coverage

Sources

2 references tracked. Mallory keeps watching after this page renders.

Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.