Cloudanix VulnDB

CVE-2010-4534

None

CVSS

—

EPSS

2.5%

Published

Jan 10, 2011

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A flaw in the web application's administrative panel could allow a logged-in user to steal sensitive information, like other users' password data, by manipulating the web address.

Exploit Available
Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Low
Impact
Data Exposure
Component
Web Framework
Class
Authorization Bypass
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability allows a remote authenticated user with access to the Django admin interface to bypass intended data access restrictions. By crafting specific URL query strings that use regular expression lookups (`__regex`), an attacker can filter database objects based on the content of sensitive fields they are not normally permitted to view. This enables them to infer the values of these fields, such as password hashes, one character at a time, leading to sensitive information disclosure.

Why it matters to the business

An authenticated but potentially low-privileged user of the administrative backend can steal sensitive information from the application's database. This could include user credentials (password hashes), personal data, or other confidential business information. This data exposure can lead to regulatory fines for non-compliance, loss of customer trust, and create pathways for further system compromise if the leaked credentials are valid for other systems.

How an attack unfolds

An attacker with authenticated access to a Django admin panel identifies a list view they are permitted to see. They then manipulate the URL's query string to add a filter based on a regular expression. For example, by adding `?user__password__regex=^a` to a user list URL, they can test if any user's password hash begins with the letter 'a'. By observing whether the query returns results, the attacker can proceed to guess the next character (`^ab`, `^ac`, etc.), systematically exfiltrating sensitive data like password hashes from the database, bypassing field-level permissions.

How to fix it

Upgrade Django to a patched version. For applications running Django 1.1.x, upgrade to 1.1.3 or later. For applications running 1.2.x, upgrade to 1.2.4 or later. For the 1.3 development branch, upgrade to 1.3 beta 1 or later. Given the age of these versions, a full migration to a modern, supported version of Django is strongly recommended to address this and numerous other security vulnerabilities.

How to confirm the fix worked

To confirm the vulnerability is patched, an authenticated test user with limited admin permissions should attempt to filter a list view using a `__regex` lookup on a sensitive field via the URL query string. For example, navigate to a user list view and append a query like `?user__password__regex=.` to the URL. On a patched system, this should result in an error or be ignored, preventing the filter from being applied. On a vulnerable system, the filter may be applied, confirming the flaw.

Typical attack path

  1. Attacker obtains credentials for the Django admin interface, even with limited permissions.
  2. Attacker identifies an accessible list view within the admin panel.
  3. Attacker crafts a URL with a malicious query string using a `__regex` lookup on a sensitive field (e.g., `password`).
  4. Attacker sends a series of requests, each with a slightly different regular expression, to incrementally guess the value of the sensitive data.
  5. Attacker analyzes the application's response (e.g., the number of results returned) to each request to confirm their guess.
  6. Attacker successfully reconstructs and exfiltrates sensitive data from the database.

How to detect it

Review web server access logs (e.g., Nginx, Apache) and Web Application Firewall (WAF) logs for evidence of exploitation. Search for HTTP GET requests to Django admin URLs that contain query parameters ending in `__regex`. A series of requests to the same URL with incrementally changing regex patterns is a strong indicator of a brute-force data extraction attempt. Correlate these requests with the authenticated user session to identify the source.

  • __password__regex=
  • __token__regex=
  • __key__regex=
  • __secret__regex=

What your security team should do

  • Immediately identify all applications using vulnerable versions of Django (before 1.1.3, 1.2.4, or 1.3 beta 1) and prioritize them for upgrade.
  • Upgrade affected Django instances to a patched and supported version.
  • Audit access controls for all Django admin interfaces, enforcing the principle of least privilege and ensuring only highly trusted users have access.
  • Configure web application firewalls (WAFs) or intrusion detection systems (IDS) to block or alert on HTTP requests containing `__regex=` in the query string, especially for admin-related URLs.

The record

The administrative interface in django.contrib.admin in Django before 1.1.3, 1.2.x before 1.2.4, and 1.3.x before 1.3 beta 1 does not properly restrict use of the query string to perform certain object filtering, which allows remote authenticated users to obtain sensitive information via a series of requests containing regular expressions, as demonstrated by a created_by__password__regex parameter.

Affected packages

Ecosystem Package Introduced Fixed
PyPI django 0 1.1.3
PyPI django 1.2 1.2.4
Debian:11 python-django 0 1.2.4-1
Debian:12 python-django 0 1.2.4-1
Debian:13 python-django 0 1.2.4-1
pypi Django 1.2 No fix

Related vulnerabilities