Cloudanix VulnDB

CVE-2015-2316

None

CVSS

—

EPSS

4.8%

Published

Mar 25, 2015

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A text-cleaning function in some older web frameworks can be tricked into freezing the entire application when given specially crafted long text.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Web Framework
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The strip_tags utility enters an infinite loop when processing an attacker-controlled input string of increased length under certain Python versions, consuming CPU and preventing further request handling.

Why it matters to the business

Web applications become unresponsive or crash under load, causing service outages and potential loss of revenue or user trust; the vulnerability is nine years old with no active exploitation campaigns reported.

How an attack unfolds

An unauthenticated attacker identifies a Django view that invokes strip_tags on user-supplied data and submits a single HTTP request containing a long, specially formatted string that triggers the loop.

How to fix it

Upgrade Django to 1.6.11, 1.7.7, or 1.8c1 (or newer maintained releases) and restart affected services; where immediate patching is impossible, wrap calls to strip_tags with timeouts or input-length limits.

How to confirm the fix worked

Verify the installed Django version meets or exceeds the fixed releases, then execute unit tests that feed progressively longer strings to strip_tags and confirm the function returns in bounded time.

Typical attack path

  1. Locate an HTTP endpoint that passes request data to strip_tags
  2. Craft an input string long enough to trigger the infinite loop under the affected Python version
  3. Send the request to the endpoint
  4. Observe the target process consuming 100% CPU and ceasing to respond to subsequent requests

How to detect it

Review web-server and application logs for requests with unusually long query or body parameters followed by worker processes showing sustained high CPU; correlate with WSGI or uWSGI request timeout entries.

What your security team should do

  • Apply the listed Django upgrades within 30 days
  • Add input-size validation around any remaining calls to strip_tags
  • Monitor application CPU and request latency for sudden spikes
  • Remove or replace deprecated strip_tags usage in new code

The record

The utils.html.strip_tags function in Django 1.6.x before 1.6.11, 1.7.x before 1.7.7, and 1.8.x before 1.8c1, when using certain versions of Python, allows remote attackers to cause a denial of service (infinite loop) by increasing the length of the input string.

Affected packages

Ecosystem Package Introduced Fixed
PyPI django 1.6 1.6.11
PyPI django 1.7 1.7.7
PyPI django 1.8a1 1.8c1
Debian:11 python-django 0 1.7.7-1
Debian:12 python-django 0 1.7.7-1
Debian:13 python-django 0 1.7.7-1
Mageia:4 python-django 0 1.5.9-1.2.mga4
Mageia:4 python-django14 0 1.4.20-1.mga4
SUSE:Enterprise Storage 1.0 python-Django 0 1.6.11-4.1
Ubuntu:14.04:LTS python-django 0 1.6.1-2ubuntu0.8
pypi Django 1.6 No fix
pypi Django 1.7 No fix
pypi Django 1.8a1 No fix

Related vulnerabilities