CVE-2026-125673: Potential cache poisoning via dot segments in request paths
An issue was discovered in Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20. django.middleware.cache.UpdateCacheMiddleware and django.views.decorators.cache.cachepage() are affected by a bug in django.http.HttpRequest.buildabsoluteuri(), which incorrectly normalizes request paths containing . or .. segments. Under certain deployment and URL configurations, this allows an unauthenticated attacker to poison the cache, causing cached responses to be served for unintended URLs. Earlier, unsupported Django series (such as 5.1.x, 5.0.x, and 4.2.x) were not evaluated and may also be affected. Django would like to thank 4drez for reporting this issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.1.4 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.0.11 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.2.20
Event History
Frequently Asked Questions
Which Django deployments are affected?
The issue affects Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20 when they use UpdateCacheMiddleware or the cache_page() decorator. Unsupported series including 5.1.x, 5.0.x, and 4.2.x were not evaluated and may also be affected.
What must an attacker be able to do to exploit this?
An unauthenticated attacker must be able to send requests containing . or .. path segments. Exploitation additionally depends on the deployment and URL configuration, and has high attack complexity.
What is the practical impact of successful exploitation?
An attacker can poison cached content so that cached responses are served for unintended URLs. The stated impact is integrity-only; no confidentiality or availability impact is identified.