Security Release: 0.8.5 - cookie_decode() vulnerability.

10 views
Skip to first unread message

Marcel Hellkamp

unread,
Nov 11, 2010, 5:54:18 AM11/11/10
to bott...@googlegroups.com
The cookie_decode() function is vulnerable to statistical timing attacks.

Description:
This vulnerability reduces the amount of time required to guess a valid
signature for a forged cookie.

Affects:
Bottle 0.6.4 up to 0.8.4, applications that use the secure-cookie feature.

Workaround:
Do not use secure-cookies with unpatched versions of Bottle.

Details:
Prior to this patch, the transmitted signature and the calculated
(valid) signature were compared using the python '==' operator. The
runtime of this operation depends on the length of a common string
prefix. The time difference is barely measurable for a single request,
but it exists. An attacker could send a large amounts of request with
different signatures, measure the time for each request and
statistically determine which signature is most likely to have a valid
prefix. On a fast network, this can reduce the time required to guess a
valid signature for a forged cookie.

Thanks to:
Jean-Paul "exarkun" Calderone (py-dev mailinglist)

Marcel Hellkamp

unread,
Nov 11, 2010, 5:58:22 AM11/11/10
to bott...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages