CVE-2012-3444
NoneCVSS
—
EPSS
1.8%
Published
Jul 31, 2012
CISA due date
—
Cloudanix analysis
A flaw in the website's software allows an attacker to crash the site by uploading a specially crafted large image file, making it unavailable for everyone else.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Web Framework
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability exists in the image dimension calculation function (`get_image_dimensions`). When processing a TIFF image, the function reads the file in constant-sized chunks. A remote attacker can supply a specially crafted, large TIFF image that causes this function to consume excessive CPU and memory resources, leading to process or thread exhaustion and ultimately a denial of service.
Why it matters to the business
An attacker can render a web application unresponsive or cause it to crash by simply uploading a malicious image. This leads to service outages, preventing legitimate users from accessing the application. The impact includes reputational damage, loss of user trust, and potential revenue loss for business-critical applications. Since the attack is simple to execute and requires no authentication, any public-facing site with image upload functionality is at risk.
How an attack unfolds
An unauthenticated attacker targets a web application built with a vulnerable version of Django that allows image uploads. The attacker crafts a large TIFF image file and uploads it through a standard feature, such as a profile picture updater or a forum attachment. When the Django backend receives the file and attempts to validate it by reading its dimensions, the vulnerable code enters an inefficient processing loop. This loop consumes server resources until the application server process becomes unresponsive or crashes, denying service to all legitimate users.
How to fix it
The vulnerability is patched in Django versions 1.3.2 and 1.4.1. To remediate, upgrade your Django installation to a secure version. For applications on the 1.3.x branch, upgrade to 1.3.2 or higher. For applications on the 1.4.x branch, upgrade to 1.4.1 or higher. Given the age of these versions, it is strongly recommended to migrate the application to a currently supported Django Long-Term Support (LTS) release to receive ongoing security updates.
How to confirm the fix worked
To validate the remediation, check the installed Django version in your application's environment. You can typically find this in a `requirements.txt` file or by running `python -m django --version`. Ensure the version is 1.3.2, 1.4.1, or a more recent, supported version. To test for exposure on a non-production system, monitor server CPU and memory while uploading a large TIFF image. A vulnerable system will exhibit a significant, sustained resource spike, whereas a patched system will handle the file without causing a denial of service.
Typical attack path
- The attacker identifies a Django application that accepts image uploads.
- The attacker crafts a large TIFF image file designed to trigger excessive resource consumption.
- The attacker uploads the malicious image file via a standard HTTP POST request to an upload endpoint.
- The server-side application calls the vulnerable `get_image_dimensions` function to process the image.
- The server's CPU and memory usage spikes, leading to thread/process exhaustion and causing the application to become unresponsive or crash.
How to detect it
To detect potential exploitation, review web server access logs for POST requests containing large file uploads, particularly those with `.tif` or `.tiff` extensions. Correlate these upload events with server performance metrics. A successful attack would appear as a sharp and sustained spike in CPU and/or memory utilization immediately following an image upload, potentially accompanied by application-level errors for timeouts, worker process crashes, or out-of-memory conditions in application logs.
What your security team should do
- Prioritize upgrading all Django applications to a currently supported version, as the vulnerable versions are long past their end-of-life and may contain other unpatched vulnerabilities.
- Implement server-side controls to enforce a reasonable maximum file size for all uploads. This can provide a layer of defense against this and other resource exhaustion attacks.
- Configure application performance monitoring (APM) to alert on sustained spikes in CPU or memory usage on web servers, which can provide early detection of a potential denial-of-service attack.
The record
The get_image_dimensions function in the image-handling functionality in Django before 1.3.2 and 1.4.x before 1.4.1 uses a constant chunk size in all attempts to determine dimensions, which allows remote attackers to cause a denial of service (process or thread consumption) via a large TIFF image.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | django | 0 | 1.3.2 |
| PyPI | django | 1.4 | 1.4.1 |
| Debian:11 | python-django | 0 | 1.4.1-1 |
| Debian:12 | python-django | 0 | 1.4.1-1 |
| Debian:13 | python-django | 0 | 1.4.1-1 |
| Debian:6.0 | python-django | 0 | 1.2.3-3+squeeze3 |
| pypi | Django | 1.4 | No fix |
Related vulnerabilities
- GHSA-8p8v-wh79-9r56 Django vulnerable to Uncontrolled Resource Consumption Also affects django
- GHSA-mjgh-79qc-68w3 Django has a Race Condition vulnerability Also affects django
- CVE-2026-25673 An issue was discovered in 6.0 before 6.0.3, 5.2 before 5.2.12, and 4.2 before 4.2.29. Also affects django
- CVE-2026-25674 An issue was discovered in 6.0 before 6.0.3, 5.2 before 5.2.12, and 4.2 before 4.2.29. Also affects django
- GHSA-6426-9fv3-65x8 Django has an SQL Injection issue Also affects django
- GHSA-gvg8-93h5-g6qq Django has an SQL Injection issue Also affects django
- GHSA-2mcm-79hx-8fxw Django has Observable Timing Discrepancy Also affects django
- GHSA-33mw-q7rj-mjwj Django has Inefficient Algorithmic Complexity Also affects django