Django Type Conversion Vulnerability in FilePathField and IPAddressField

python-django Updated 02 Oct 2025

Summary

23/04/2014
N/A
Yes i
Unrated
Not published

CVE-2014-0474: The (1) FilePathField, (2) GenericIPAddressField, and (3) IPAddressField model field classes in Django before 1.4.11, 1.5.x before 1.5.6, 1.6.x before 1.6.3, and 1.7.x before 1.7 beta 2 do not properly perform type conve... Affects python-django versions < 1.6.3-1. Fixed in 1.6.3-1. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 (Object-Relational Mapping) system, which allows developers to interact with databases using Python objects. The vulnerability in question affects the FilePathField, GenericIPAddressField, and IPAddressField model field classes in Django versions prior to 1.4.11, 1.5.x before 1.5.6, 1.6.x before 1.6.3, and 1.7.x before 1.7 beta 2. This issue arises from improper type conversion, particularly related to MySQL typecasting, which could lead to unexpected behaviors and potential security risks.

Vulnerability Detail

The vulnerability stems from the failure of the FilePathField, GenericIPAddressField, and IPAddressField model field classes to properly perform type conversion. This oversight allows remote attackers to exploit the typecasting mechanism in MySQL, leading to unspecified impacts and vectors. The lack of adequate type validation can result in data integrity issues, application crashes, or even unauthorized access to sensitive information, making it critical for users of affected Django versions to address this vulnerability promptly.

How To Fix

Minimum fixed version

1.6.3-1

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

If upgrading is not immediately possible, consider implementing input validation to ensure that the data being passed to these fields is of the expected type. This can help mitigate some risks associated with the vulnerability until a proper upgrade can be performed.

Conclusion

The vulnerability in Django's model field classes poses significant risks to applications using affected versions. It is crucial for developers to upgrade to a secure version and implement best practices for input validation to safeguard their applications. Utilizing tools like Vulert can assist in monitoring for such vulnerabilities effectively.

See every vulnerability recorded for python-django →

Share this vulnerability

FAQ

Django versions before 1.4.11, 1.5.x before 1.5.6, 1.6.x before 1.6.3, and 1.7.x before 1.7 beta 2 are affected.

The vulnerability can lead to data integrity issues, application crashes, or unauthorized access to sensitive information.

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

Yes, implementing input validation for the affected fields can help mitigate some risks until an upgrade is possible.

If an immediate upgrade is not feasible, ensure that you have implemented proper input validation and monitor your application for any unusual behavior.

Related vulnerabilities

Recent vulnerabilities recorded for python-django.

How To Fix

Minimum fixed version

1.6.3-1

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