CVE-2025-48432: Django HTTP Response Logging Vulnerability Leading to Log Injection

django Updated 02 Oct 2025

Summary

05/06/2025
Yes i
Moderate
4.0

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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.22 4.2.22
    pip install --upgrade "django==4.2.22"
  • >= 5.1, < 5.1.10 5.1.10
    pip install --upgrade "django==5.1.10"
  • >= 5.2, < 5.2.2 5.2.2
    pip 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 →

Share this vulnerability

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.

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.22 4.2.22
    pip install --upgrade "django==4.2.22"
  • >= 5.1, < 5.1.10 5.1.10
    pip install --upgrade "django==5.1.10"
  • >= 5.2, < 5.2.2 5.2.2
    pip 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback