Cloudanix VulnDB

CVE-2014-0480

None

CVSS

—

EPSS

2.3%

Published

Aug 26, 2014

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in the website's software could allow attackers to create malicious links that look legitimate but redirect users to fraudulent sites to steal their information.

Chainable
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Moderate
Impact
Data Exposure
Component
Web Framework
Class
Improper Input Validation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability exists in Django's `core.urlresolvers.reverse` function, which fails to properly validate URLs. When processing a URL containing a double slash (`//`), the function incorrectly generates a scheme-relative URL. This allows an attacker to craft a URL that appears to belong to the legitimate application but actually redirects the user's browser to an external, attacker-controlled domain. This is a form of an open redirect vulnerability.

Why it matters to the business

Successful exploitation can lead to phishing attacks against users, eroding trust in the brand and potentially leading to credential theft and financial fraud. This damages the company's reputation and can result in customer loss. The vulnerability makes it easier for attackers to leverage the trust users have in the legitimate site to launch effective social engineering campaigns.

How an attack unfolds

An attacker crafts a malicious URL targeting a vulnerable Django application. This URL includes a double slash (`//`) followed by a domain the attacker controls, embedded within a parameter that the application uses for redirection. The attacker then distributes this link via phishing emails or social media. When a victim clicks the link, their browser is sent to the legitimate Django site, which then incorrectly processes the URL and issues a redirect to the attacker's external domain. The victim, having seen the legitimate domain initially, is more likely to trust the malicious site, which could be a credential harvesting page or a malware distribution point.

How to fix it

To remediate this vulnerability, developers must upgrade the Django framework to a patched version. The specific fixed versions are Django 1.4.14, 1.5.9, 1.6.6, and 1.7 release candidate 3. Any applications running on versions prior to these should be updated to the latest available release in their respective series or migrated to a currently supported Django version.

How to confirm the fix worked

To validate the fix, check the installed version of Django to ensure it meets or exceeds the patched versions (1.4.14, 1.5.9, 1.6.6, or 1.7 RC3+). Additionally, you can perform a manual test by attempting to use the application's redirect functionality with a crafted URL containing a double slash and an external domain (e.g., `https://your-app.com/some-redirect?next=//example.com`). A patched system should not redirect to the external domain, whereas a vulnerable system will.

Typical attack path

  1. The attacker identifies a public-facing Django application vulnerable to CVE-2014-0480.
  2. A malicious URL is crafted, embedding a scheme-relative path (e.g., `//attacker-domain.com`) into a parameter handled by the vulnerable application.
  3. The attacker distributes this URL to victims through phishing campaigns or by posting it on public forums.
  4. A user clicks the link, believing it to be a legitimate link to a trusted website.
  5. The vulnerable Django application processes the request and generates a redirect response, sending the user's browser to the attacker-controlled domain.
  6. The user's credentials or other sensitive information are stolen via the malicious site, or their machine is infected with malware.

How to detect it

To detect potential exploitation, security analysts should search web server access logs (e.g., Nginx, Apache, IIS) and application logs for requests where URL query parameters contain a double slash (`//`) followed by an external domain name. Pay close attention to common redirect parameters like `next`, `url`, `redirect`, `goto`, and `dest`. Correlating these log entries with outbound requests to untrusted domains can indicate successful exploitation. SIEM rules can be created to alert on HTTP requests matching this pattern.

  • ?next=//
  • ?url=//
  • &redirect=//
  • &goto=//
  • &dest=//

What your security team should do

  • Immediately identify all Django applications and prioritize upgrading those running versions older than 1.4.14, 1.5.9, or 1.6.6.
  • Configure web application firewalls (WAFs) to detect and block requests containing URL patterns indicative of open redirect attacks, such as a double slash followed by a domain in a redirect parameter.
  • Incorporate security scanning tools into the CI/CD pipeline to detect open redirect vulnerabilities in custom code and third-party dependencies.

The record

The core.urlresolvers.reverse function in Django before 1.4.14, 1.5.x before 1.5.9, 1.6.x before 1.6.6, and 1.7 before release candidate 3 does not properly validate URLs, which allows remote attackers to conduct phishing attacks via a // (slash slash) in a URL, which triggers a scheme-relative URL to be generated.

Affected packages

Ecosystem Package Introduced Fixed
PyPI django 0 1.4.14
PyPI django 1.5 1.5.9
PyPI django 1.5.0 1.5.9
PyPI django 1.6 1.6.6
PyPI django 1.6.0 1.6.6
Debian:11 python-django 0 1.6.6-1
Debian:12 python-django 0 1.6.6-1
Debian:13 python-django 0 1.6.6-1
Debian:6.0 python-django 0 1.2.3-3+squeeze11
Debian:7 python-django 0 1.4.5-1+deb7u8
Mageia:3 python-django 0 1.4.14-1.mga3
Mageia:4 python-django 0 1.5.9-1.mga4
Mageia:4 python-django14 0 1.4.14-1.3.mga4
Ubuntu:14.04:LTS python-django 0 1.6.1-2ubuntu0.4
pypi Django 1.5 No fix
pypi Django 1.6 No fix

Related vulnerabilities