Caching of anonymous pages could reveal CSRF token
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-django (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Unassigned | ||
Quantal |
Fix Released
|
Undecided
|
Unassigned | ||
Saucy |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Django includes both a caching framework and a system for preventing
cross-site request forgery (CSRF) attacks. The CSRF-protection system
is based on a random nonce sent to the client in a cookie which must
be sent by the client on future requests, and in forms a hidden value
which must be submitted back with the form.
The caching framework includes an option to cache responses to
anonymous (i.e., unauthenticated) clients.
When the first anonymous request to a given page was by a client which
did not have a CSRF cookie, the cache framework will also cache the
CSRF cookie, and serve the same nonce to other anonymous clients who
do not have a CSRF cookie. This allows an attacker to obtain a valid
CSRF cookie value and perform attacks which bypass the check for the
cookie.
To remedy this, the caching framework will no longer cache such
responses. The heuristic for this will be:
1. If the incoming request did not submit any cookies, and
2. The response did send one or more cookies, and
3. The ``Vary: Cookie`` header is set on the response, then the
response will not be cached.
CVE References
information type: | Private Security → Public Security |
This bug was fixed in the package python-django - 1.1.1-2ubuntu1.10
---------------
python-django (1.1.1-2ubuntu1.10) lucid-security; urgency=medium
* SECURITY UPDATE: unexpected code execution using reverse() patches/ CVE-2014- 0472.patch: added filtering to core/urlresolve rs.py, added tests to regressiontests /urlpatterns_ reverse/ nonimported_ module. py, regressiontests /urlpatterns_ reverse/ tests.py, regressiontests /urlpatterns_ reverse/ urls.py, regressiontests /urlpatterns_ reverse/ views.py. patches/ CVE-2014- 0473.patch: don't cache responses with a middleware/ cache.py, backport has_vary_header() to utils/cache. py. patches/ CVE-2014- 0474.patch: convert arguments to correct db/models/ fields/ __init_ _.py, added tests to regressiontests /model_ fields/ tests.py.
(LP: #1309779)
- debian/
django/
tests/
tests/
tests/
tests/
- CVE-2014-0472
* SECURITY UPDATE: caching of anonymous pages could reveal CSRF token
(LP: #1309782)
- debian/
cookie in django/
django/
- CVE-2014-0473
* SECURITY UPDATE: MySQL typecasting issue (LP: #1309784)
- debian/
type in django/
tests/
- CVE-2014-0474
-- Marc Deslauriers <email address hidden> Sat, 19 Apr 2014 11:21:00 -0400