CVE-2026-53878
Description
A flaw was found in Django. django.core.validators.DomainNameValidator accepted newline characters in domain name input. When applications use this validator outside Django form fields and include the validated value in HTTP response headers, a remote attacker could perform HTTP header injection. Django core is not affected because HttpResponse rejects newlines in headers, and CharField strips newlines by default.
Statement
This flaw has a Low impact on Red Hat products. A vulnerability in Django's DomainNameValidator allows newline characters, which could enable HTTP header injection if validated values are directly used in HTTP response headers outside of Django's standard form handling. However, Django's core HTTP response mechanisms and default form field behaviors prevent this issue in typical deployments by rejecting or stripping newline characters. Exploitation requires a specific, non-default application implementation.
Mitigation
To mitigate this issue, ensure that custom Django applications do not directly place values validated by `DomainNameValidator` into HTTP response headers without further sanitization. Applications should rely on Django's default form handling and `HttpResponse` functionality, which automatically prevent newline injection. If direct header manipulation is unavoidable, implement explicit input sanitization to remove newline characters before constructing HTTP response headers.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 3.7 | N/A | 6.1 |
| Attack Vector | Network | N/A | Network |
| Attack Complexity | High | N/A | Low |
| Privileges Required | None | N/A | None |
| User Interaction | None | N/A | Required |
| Scope | Unchanged | N/A | Changed |
| Confidentiality | None | N/A | Low |
| Integrity Impact | Low | N/A | Low |
| Availability Impact | None | N/A | None |
Vector
Red Hat: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Understanding the Weakness (CWE)
Integrity,Access Control
Technical Impact: Modify Application Data; Gain Privileges or Assume Identity
CR and LF characters in an HTTP header may give attackers control of the remaining headers and body of the message that the application intends to send/receive, as well as allowing them to create additional messages entirely under their control.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.