CVE-2025-48432: Django HTTP Response Logging Vulnerability Leading to Log Injection
Summary
CVE-2025-48432: An issue was discovered in Django 5.2 before 5.2.2, 5.1 before 5.1.10, and 4.2 before 4.2.22. Affects django across 3 version ranges.
>= 4.2, < 4.2.22
>= 5.1, < 5.1.10
>= 5.2, < 5.2.2
Fixed in 4.2.22, 5.1.10 or 5.2.2, depending on the release line you run. How to fix ↓
Also tracked for
- django · Bitnami
- python-django · Debian:11
The same CVE-2025-48432 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It provides a robust set of features for building web applications, including an ORM, routing, authentication, and an admin interface. However, certain versions of Django are susceptible to a vulnerability that affects its internal HTTP response logging, allowing potential manipulation of log outputs.
Vulnerability Detail
An issue was discovered in Django versions 5.2 before 5.2.2, 5.1 before 5.1.10, and 4.2 before 4.2.22. The vulnerability arises from the internal HTTP response logging mechanism, which fails to escape the request.path. This oversight allows remote attackers to craft URLs that can manipulate log output. The consequences include log injection or forgery, which can compromise the integrity of logs when viewed in terminals or processed by external systems.
How To Fix
Latest published version: 6.1.2 as of 22 Oct 2026
pip install --upgrade "django==6.1.2"
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
>= 4.2, < 4.2.224.2.22pip install --upgrade "django==4.2.22" -
>= 5.1, < 5.1.105.1.10pip install --upgrade "django==5.1.10" -
>= 5.2, < 5.2.25.2.2pip install --upgrade "django==5.2.2"
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, consider sanitizing log outputs manually or implementing additional logging mechanisms that escape or validate log entries before they are recorded. However, the best course of action is to apply the patch as soon as possible.
Conclusion
In summary, the vulnerability identified as CVE-2025-48432 in Django poses a significant risk due to improper handling of HTTP response logging. It is crucial to update to the latest patched versions to safeguard your application against potential log manipulation attacks.
See every vulnerability recorded for django →
FAQ
Django versions 5.2 before 5.2.2, 5.1 before 5.1.10, and 4.2 before 4.2.22 are affected.
If left unaddressed, this vulnerability can lead to log injection or forgery, potentially compromising the integrity of your application's logs.
You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to use the Vulert playground without signup.
Yes, you can implement manual sanitization of log outputs or use additional logging mechanisms to validate log entries as a temporary measure.
More information can be found in the official Django release notes and security advisories related to the versions mentioned.
Related vulnerabilities
Recent vulnerabilities recorded for django.