Vulnerabilities

Multiple Vulnerabilities In Django Facilitate SQL Injection and Denial-of-Service Attacks

The Django project released security patches on December 2, 2025, addressing two vulnerabilities in versions 5.2.9, 5.1.15, and 4.2.27.

Posted by maintainer Natalia Bidart, these updates fix a high-severity SQL injection risk on PostgreSQL and a moderate-severity denial-of-service (DoS) flaw in the XML serializer.

Affected branches include the main codebase, Django 6.0 (release candidate), 5.2, 5.1, and 4.2. Users should upgrade immediately to mitigate potential exploits, in line with Django’s security policy.

Django, a popular Python web framework, powers thousands of applications.

These flaws could enable attackers to manipulate databases or crash services, underscoring the need for prompt patching in production environments.

CVE-2025-13372: SQL Injection via FilteredRelation Aliases

This high-severity issue (per Django’s policy) stems from improper handling of column aliases in FilteredRelation.

Attackers can inject malicious SQL using a crafted dictionary expanded via **kwargs in QuerySet.annotate() or QuerySet.alias() calls, but only on PostgreSQL backends.

FilteredRelation lets developers filter related querysets during annotations. Usually, it generates safe SQL aliases like related__field.

However, dictionary expansion allows unescaped input, such as {“alias”: “malicious’; DROP TABLE users;–“}, to bypass sanitization.

This crafts payloads like alias ‘; malicious’; DROP TABLE users;- “, executing arbitrary SQL if the query reaches the database.

Stackered reported the flaw. Patches escape aliases across branches, including main, 5.2, and others. No public exploits exist yet, but the PostgreSQL-specificity limits the blast radius to that database.

CVE-2025-64460: DoS From XML Text Extraction Complexity

Reported by Seokchan Yoon of ch4n3.kr, this moderate-severity vulnerability affects django.core.serializers.xml_serializer.getInnerText().

Remote attackers submit crafted XML to XML deserialization endpoints, triggering CPU and memory exhaustion.

The function recursively collects text nodes by repeatedly concatenating their texts: text += node.text in a loop.

Deeply nested XML, like <root><a><b>…</b></a></root> repeated exponentially, causes quadratic time complexity.

For depth nn, concatenation builds strings of size O(2n)O(2n), exhausting resources in seconds.

Patches optimize to linear-time collection using lists joined once, available on main, 5.2, and more.

CVE IDSeverityDescription SummaryAffected FeatureReporter
CVE-2025-13372HighSQLi in FilteredRelation PostgreSQL aliasesQuerySet.annotate()/alias()Stackered
CVE-2025-64460ModerateDoS via recursive XML string concatenationxml_serializer.getInnerText()Seokchan Yoon
Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies..

Recent Posts

Burp Suite Supercharges Its Scanning Capabilities With React2Shell Vulnerability Detection

PortSwigger has leveled up Burp Suite's scanning arsenal with the latest Active Scan++ extension, version…

4 months ago

Malicious MCP Servers Enable New Prompt Injection Attack To Drain Resources

Unit 42 researchers at Palo Alto Networks exposed serious flaws in the Model Context Protocol…

4 months ago

Law Enforcement Detains Hackers Equipped With Specialized Flipper Hacking Tools

Polish police have arrested three Ukrainian men traveling through Europe and seized a cache of…

4 months ago

Google Unveils 10 New Gemini-Powered AI Features For Chrome

Google has launched its most significant Chrome update ever, embedding Gemini AI across the browser…

4 months ago

CISA Alerts On Actively Exploited Buffer Overflow Flaw In D-Link Routers

Attackers exploit this vulnerability through the router's web interface components, specifically "cgibin" and "hnap_main," by…

4 months ago

Over 500 Apache Tika Toolkit Instances Exposed To Critical XXE Vulnerability

Security researchers have uncovered a severe flaw in Apache Tika, a popular open-source toolkit for…

4 months ago