Skip to main content

Django CVE-2026-53878

| EUVDEUVD-2026-42045 MEDIUM
Improper Neutralization of Line Delimiters (CWE-144)
2026-07-07 DSF GHSA-8qcx-xf44-272x
5.3
CVSS 4.0 · Vendor: DSF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker submits domain name with embedded CRLF
  2. Delivery
    DomainNameValidator accepts input without stripping newlines
  3. Exploit
    Application writes value into raw WSGI/ASGI response header outside HttpResponse
  4. Execution
    Injected header included in HTTP response to victim
  5. Persist
    Victim browser processes forged header (Set-Cookie, Location, etc.)
  6. Impact
    Session fixation or open redirect achieved

Vulnerability Assessment

Weakness
CWE
Exploitation Conditions

Two simultaneous application-level conditions are required: (1) the application invokes DomainNameValidator (or a model field that uses it) directly on user-controlled input without routing through a Django form backed by CharField, since CharField.clean() strips newlines before validation occurs; AND (2) the validator-accepted domain string is inserted into an HTTP response header via a raw WSGI/ASGI response mechanism that bypasses Django's own HttpResponse API, which independently rejects newline characters in header values. Standard Django form-processing flows and HttpResponse-based header assignment are each independently protected against this attack. Exploitation is further limited by the UI:R requirement: a victim user must receive and process the crafted HTTP response for header injection to produce practical impact (e.g., a browser honoring an injected Set-Cookie or Location header). Unauthenticated remote attackers can trigger the injection, but achieving meaningful impact requires influencing a response delivered to a victim's browser session.

Impact

The NVD-assigned CVSS 3.1 score of 6.1 (Medium) with vector AV:N/AC:L/PR:N/UI:R/S:C reflects a realistic worst case where a network attacker with no privileges manipulates a header that affects a victim's browser session. However, this score overstates real-world risk for typical Django deployments: because HttpResponse (the standard header-assignment mechanism) independently prohibits newline injection, exploitation requires the uncommon pattern of using DomainNameValidator output directly in raw response header construction outside of HttpResponse. This is a non-default application architecture. No KEV listing and no public exploit code exist at time of analysis; EPSS data was not included in the source intelligence, so exploitation probability from that signal is unknown. The vulnerability is best classified as a defense-in-depth failure at the validator layer rather than a broadly exploitable flaw. Applications that directly pipe DomainNameValidator-validated values into custom WSGI/ASGI header logic should treat this as a high priority; mainstream Django applications using standard form and response APIs face minimal practical risk.

Exploit ScenarioDerived

An attacker submits a crafted domain value containing an embedded CRLF sequence (e.g., legitimate.com\r\nSet-Cookie: session=attacker) to a Django application that validates it with DomainNameValidator and then writes the result into an HTTP response header via a raw WSGI/ASGI response path rather than through HttpResponse. The server delivers the response to a victim user whose browser parses the injected header - honoring the forged Set-Cookie, Location redirect, or similar directive - enabling session fixation or open redirect exploitation. No public proof-of-concept has been identified, though HTTP response splitting is a well-documented, low-complexity technique once a vulnerable code path is identified.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 07, 2026

Header injection in Django's DomainNameValidator allows network attackers to inject arbitrary HTTP response headers when applications pass validator-accepted domain values directly into HTTP responses, affecting Django 6.0 before 6.0.7 and 5.2 before 5.2.16. The validator silently accepts embedded newline characters in domain name strings, enabling HTTP response splitting that can facilitate session hijacking, open redirects, or cross-site scripting against end users. No public exploit code or CISA KEV listing exists at time of analysis; practical risk is narrowed significantly by Django's HttpResponse class independently rejecting newlines, meaning only non-standard code paths are exploitable.

RemediationAI

Upgrade to Django 6.0.7 or Django 5.2.16, released by the Django Software Foundation on 2026-07-07 and documented at https://www.djangoproject.com/weblog/2026/jul/07/security-releases/. For deployments that cannot patch immediately, audit all code paths where DomainNameValidator (or model fields that invoke it) is called directly on user-supplied input and the result is subsequently written to an HTTP response header outside of Django's HttpResponse or HttpResponseBase APIs - these are the only exploitable patterns. A targeted compensating control is to add explicit newline stripping before any user-influenced string is placed in a header value (e.g., value.replace('\r', '').replace('\n', '')); note this addresses the symptom rather than the root cause and should not substitute for patching. Avoid relying on unsupported Django series (5.0.x and earlier) in production environments, as those branches have not been assessed and carry no committed patch path.

Affected VersionsENISA

Django 5.2 <5.2.16
Django 6.0 <6.0.7

Affected Packages

pypi django fix: 5.2.16, 6.0.7

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-144 (Improper Neutralization of Line Delimiters): Django's DomainNameValidator fails to reject or strip CRLF (\r\n) and LF (\n) characters from domain name inputs. In HTTP/1.1, headers are delimited by CRLF sequences, so injecting newlines into a header value allows an attacker to terminate the current header and append entirely new ones - a technique known as HTTP response splitting. The affected CPE cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* spans all Django versions in the 5.2 and 6.0 series. Two independent safeguards exist in the standard stack that limit exposure: Django's CharField.clean() strips newlines before passing values to the validator (protecting form-based flows), and Django's HttpResponse API independently rejects newlines when setting headers. The vulnerability surfaces only when DomainNameValidator is invoked outside of a form field AND its output is written to a response header through a raw WSGI/ASGI path that bypasses HttpResponse's own sanitization guard.

Know when Django gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (DSF) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
vuln.today AI 4.7 MEDIUM

AC:H reflects the non-default application pattern required - direct DomainNameValidator use bypassing both CharField and HttpResponse protections; remaining metrics mirror standard header injection impact.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
SUSE 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Red Hat 3.7 LOW

Primary rating from Vendor (DSF).

CVSS VectorVendor: DSF

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Jul 07, 2026 - 16:01 EUVD
CVSS changed
Jul 07, 2026 - 15:22 NVD
6.1 (MEDIUM) 5.3 (MEDIUM)

DescriptionCVE.org

An issue was discovered in Django 6.0 before 6.0.7 and 5.2 before 5.2.16. DomainNameValidator does not prohibit newlines in domain names (unless used via a form field, since CharField strips newlines). If an application uses values with newlines in an HTTP response, header injection can occur. Django itself is unaffected because HttpResponse prohibits newlines in HTTP headers. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected. Django would like to thank Bence Nagy for reporting this issue.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 12 pypi packages depend on django (12 direct, 0 indirect)

Ecosystem-wide dependent count for version 5.2.

Threat Intelligence Overview

EPSS Score
0.2%
Top 88% exploitable
Prevalence
High
widely deployed Python web framework across enterprise and startup web applications
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

More in Django

View all
CVE-2021-23336 MEDIUM POC
5.9 Feb 15

The package python/cpython from 0 and before 3.6.13, from 3.7.0 and before 3.7.10, from 3.8.0 and before 3.8.8, from 3.9

CVE-2017-12794 MEDIUM POC
6.1 Sep 07

In Django 1.10.x before 1.10.8 and 1.11.x before 1.11.5, HTML autoescaping was disabled in a portion of the template for

CVE-2022-34265 CRITICAL POC
9.8 Jul 04

An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. Rated critical severity (CVSS 9.8), this vulne

CVE-2021-35042 CRITICAL POC
9.8 Jul 02

Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection if order_by is untrusted input

CVE-2019-19844 CRITICAL POC
9.8 Dec 18

Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. Rated critical severity (CVSS 9.8

CVE-2026-61594 CRITICAL POC
9.1 Sep 16

An authentication/authorization bypass in the djust Python live-view framework (versions prior to 1.0.7) lets unauthenti

CVE-2026-61599 HIGH POC
8.8 Sep 16

Unauthenticated arbitrary Python module import in djust before 1.0.7 lets any client that can reach the WebSocket or SSE

CVE-2020-9402 HIGH POC
8.8 Mar 05

Django 1.11 before 1.11.29, 2.2 before 2.2.11, and 3.0 before 3.0.4 allows SQL Injection if untrusted data is used as a

CVE-2016-6186 MEDIUM POC
6.1 Aug 05

Cross-site scripting (XSS) vulnerability in the dismissChangeRelatedObjectPopup function in contrib/admin/static/admin/j

CVE-2026-93456 HIGH POC
8.4 Sep 18

Forged content modification in django-page-cms through 2.0.13 lets unauthenticated remote attackers exploit five CSRF-ex

CVE-2026-61593 HIGH POC
8.1 Sep 16

Cross-site request forgery in djust's Server-Sent-Events transport affects all versions prior to 1.0.7 and allows a cros

CVE-2026-61590 HIGH POC
7.4 Sep 16

Unauthenticated remote attackers can read live Django view and session state and invoke server-side handlers through dju

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Leap 16.0 Fixed
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP7 Not-Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Not-Affected
openSUSE Leap 15.6 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy