CVE-2025-48432: Django Improper Output Neutralization for Logs Vulnerability
Summary
CVE-2025-48432: Django Improper Output Neutralization for Logs vulnerability. Affects django across 3 version ranges.
< 4.2.22
>= 5.0a1, < 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, authentication, and an admin interface. However, certain versions of Django are vulnerable to improper output neutralization in logs, which can lead to security issues.
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 that does not escape the request.path. This oversight allows remote attackers to manipulate log output through crafted URLs, potentially leading to log injection or forgery when logs are viewed in terminals or processed by external systems. The severity of this vulnerability is rated as moderate, with a CVSS score of 4.0.
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.224.2.22pip install --upgrade "django==4.2.22" -
>= 5.0a1, < 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, users can implement custom logging handlers that sanitize the log output to prevent injection attacks. However, this is not a permanent solution and upgrading to the patched version is highly recommended.
Conclusion
The Django Improper Output Neutralization for Logs vulnerability poses a moderate risk to applications using affected versions of the framework. It is crucial for developers to upgrade to the latest patched versions to mitigate potential security risks.
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.
The vulnerability may lead to log injection or forgery, compromising the integrity of log data.
You can use Vulert to monitor and alert in real-time for open-source vulnerabilities. Visit Vulert Scanner to check if your application is affected without requiring signup.
The CVSS score of this vulnerability is 4.0, indicating a moderate severity level.
Yes, the permanent fix is to upgrade to the patched versions of Django: 5.2.2, 5.1.10, or 4.2.22.
Related vulnerabilities
Recent vulnerabilities recorded for django.