Critical Vulnerability in python-django: Log Injection Risk

python-django Updated 03 Oct 2025

Summary

16/06/2025
N/A
Yes i
Unrated
Not published

USN-7555-2: python-django vulnerability. Affects python-django versions < 2:3.2.12-2ubuntu1.20. Fixed in 2:3.2.12-2ubuntu1.20. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

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

python-django is a widely used web framework for building web applications in Python. It provides a robust set of features for rapid development, including an ORM, routing, and templating. However, certain versions of python-django have been found to have vulnerabilities that could allow attackers to exploit the framework, particularly through unescaped request paths, leading to potential log injection attacks.

Vulnerability Detail

The vulnerability arises from Django's improper handling of certain unescaped request paths. This flaw could allow an attacker to inject malicious log entries, which could be exploited to manipulate logs or execute further attacks. The issue was initially addressed in USN-7555-1 but was found to be incomplete, necessitating an additional patch in USN-7555-2.

How To Fix

Minimum fixed version

2:3.2.12-2ubuntu1.20

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-django

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, consider sanitizing input paths to ensure they do not contain unescaped characters. Implement logging mechanisms that can filter out potentially harmful entries until the package is updated.

Conclusion

The python-django vulnerability presents a significant risk due to the potential for log injection attacks. It is crucial for users to update their packages to the latest patched versions to mitigate this risk. Utilizing tools like Vulert can help monitor and identify vulnerabilities in your applications.

See every vulnerability recorded for python-django →

Share this vulnerability

FAQ

The vulnerability allows for log injection through improperly handled unescaped request paths.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Check your application using the Vulert playground at Vulert Scanner.

An attacker could manipulate logs, potentially hiding malicious activities or executing further attacks based on the log data.

Yes, patches are available for various Ubuntu versions. Ensure you update to the specified patched versions.

Implement input sanitization and logging filters as a temporary workaround until you can apply the patch.

Related vulnerabilities

Recent vulnerabilities recorded for python-django.

How To Fix

Minimum fixed version

2:3.2.12-2ubuntu1.20

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-django

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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