
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-53878 is an HTTP header injection vulnerability in Django's DomainNameValidator that fails to prohibit newline characters in domain names. Affected versions are Django 5.2 before 5.2.16 and Django 6.0 before 6.0.7; earlier unsupported series (5.0.x, 4.1.x, 3.2.x) were not evaluated but may also be affected. The vulnerability was reported by Bence Nagy and publicly disclosed on July 7, 2026. It carries a CVSS v3.1 score of 6.1 (Medium) and a CVSS v4.0 score of 5.3 (Medium) (GitHub Advisory, Django Security Releases).
The root cause is improper neutralization of line delimiters (CWE-144) and CRLF sequences in HTTP headers (CWE-113). Django's DomainNameValidator does not strip or reject newline characters from domain name input; while CharField used in form fields does strip newlines, direct programmatic use of the validator does not. If an application passes a domain name value containing newlines directly into an HTTP response header outside of Django's form handling layer, an attacker can inject arbitrary HTTP headers. Django's own HttpResponse class is not directly vulnerable because it already prohibits newlines in headers, but custom application code that uses validated domain values in response headers is at risk (GitHub Advisory, Red Hat Bugzilla).
Successful exploitation enables an unauthenticated attacker to inject arbitrary HTTP response headers into affected applications, contingent on user interaction (e.g., a victim visiting a crafted URL). This can lead to session hijacking via cookie injection, cache poisoning, cross-site scripting through injected content-type or location headers, and credential theft. Confidentiality and integrity of the subsequent system (e.g., browser or proxy) are impacted at a low level; availability is not affected (GitHub Advisory, Django Security Releases).
There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the disclosure date (GitHub Advisory). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. The EPSS score is approximately 0.217% (12th percentile), indicating a low near-term exploitation probability. Exploitation is not automatable and requires user interaction, limiting its practical attack surface to applications that directly use DomainNameValidator output in HTTP response headers outside of form handling (GitHub Advisory).
DomainNameValidator to validate user-supplied domain names and then places those values directly into HTTP response headers (e.g., a Location, Set-Cookie, or custom header) outside of Django's form handling.\r\n or \n) followed by an injected header, such as evil.com\r\nSet-Cookie: session=attacker_value; Path=/.CharField), or API endpoint that passes the value through DomainNameValidator and into an HTTP response header.Set-Cookie), cache poisoning, or redirection attacks (GitHub Advisory, Red Hat Bugzilla).Set-Cookie or Location headers) that were not explicitly set by application logic.%0d%0a, %0a, %0d) in fields processed by DomainNameValidator.Set-Cookie, Location, or Content-Type headers with anomalous values.Upgrade Django to version 5.2.16 or later (for the 5.2 series) or 6.0.7 or later (for the 6.0 series), which include patches that prevent newline characters from being accepted by DomainNameValidator (Django Security Releases). For applications that cannot be immediately upgraded, sanitize any domain name values before placing them into HTTP response headers by stripping or rejecting newline characters (\r, \n) in application code. Users on unsupported Django versions (5.0.x, 4.1.x, 3.2.x) should evaluate their exposure and consider migrating to a supported release (Red Hat Bugzilla).
The Django project credited Bence Nagy for responsibly reporting the issue and published a coordinated security release on July 7, 2026 (Django Security Releases). Red Hat tracked the issue via Bugzilla and prepared patches for affected downstream packages (Red Hat Bugzilla). The vulnerability was also disclosed on the oss-security mailing list and picked up by Linux distribution security teams including openSUSE and Fedora, which issued their own advisories and package updates.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."