CVE-2015-2316
NoneCVSS
—
EPSS
4.8%
Published
Mar 25, 2015
CISA due date
—
Cloudanix analysis
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
- Locate an HTTP endpoint that passes request data to strip_tags
- Craft an input string long enough to trigger the infinite loop under the affected Python version
- Send the request to the endpoint
- 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
- 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