Cross-Site Scripting Vulnerability in python-django

python-django Updated 02 Oct 2025

Summary

01/09/2013
N/A
Yes i
Unrated
Not published

DSA-2740-2: python-django - regression. Affects python-django versions < 1.4.5-1+deb7u2. Fixed in 1.4.5-1+deb7u2. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

python-django is a high-level Python web development framework. It provides a set of tools and libraries for building web applications quickly and efficiently. The framework follows the model-view-controller (MVC) architectural pattern and includes features such as an object-relational mapper (ORM), URL routing, form handling, and template rendering. The vulnerability in python-django allows for potential cross-site scripting attacks through maliciously-constructed querystrings that can lead to dangerous redirects.

Vulnerability Detail

The is_safe_url utility function in python-django is designed to validate that a URL is on the current host and prevent potentially dangerous redirects. However, it had a regression issue where it allowed redirects to other schemes, such as javascript:. This could be exploited by an attacker to perform cross-site scripting attacks by redirecting users to malicious websites. The vulnerability affects versions prior to 1.4.5-1+deb7u2 for Debian 7 (wheezy).

How To Fix

Minimum fixed version

1.4.5-1+deb7u2

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

There is no specific workaround mentioned for this vulnerability. The recommended solution is to upgrade python-django to the fixed version.

Conclusion

The cross-site scripting vulnerability in python-django can be mitigated by upgrading to the fixed version. It is important to keep software up to date to ensure the security of web applications. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for python-django →

Share this vulnerability

FAQ

Python-django is a high-level Python web development framework that provides tools and libraries for building web applications.

The vulnerability allows for potential cross-site scripting attacks by redirecting users to malicious websites.

Versions prior to 1.4.5-1+deb7u2 for Debian 7 (wheezy) are affected.

To fix this vulnerability, upgrade python-django to version 1.4.5-1+deb7u2 or later.

There is no specific workaround mentioned for this vulnerability. Upgrading python-django is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for python-django.

How To Fix

Minimum fixed version

1.4.5-1+deb7u2

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