Weblog

Security fix released

Today we're releasing a fix for a security vulnerability discovered in Django's internationalization framework. The complete details are below, but the executive summary is that you should updated to a fixed version of Django immediately.

We are releasing point-releases of all affected Django versions. You can download them at http://www.djangoproject.com/download/. Those tracking trunk development should "svn update" as soon as possible.

Please direct any questions about this release to django-users (http://groups.google.com/group/django-users).

Description of vulnerability

A per-process cache used by Django's internationalization ("i18n") system to store the results of translation lookups for particular values of the HTTP Accept-Language header used the full value of that header as a key. An attacker could take advantage of this by sending repeated requests with extremely large strings in the Accept-Language header, potentially causing a denial of service by filling available memory.

Due to limitations imposed by Web server software on the size of HTTP header fields, combined with reasonable limits on the number of requests which may be handled by a single server process over its lifetime, this vulnerability may be difficult to exploit. Additionally, it is only present when the "USE_I18N" setting in Django is "True" and the i18n middleware component is enabled*. Nonetheless, all users of affected versions of Django are encouraged to update.

Affected versions

  • Django trunk prior to revision [6608].
  • Django 0.96
  • Django 0.95 (including 0.95.1)
  • Django 0.91

Resolution

New versions of Django containing this fix have been released today which alter this caching mechanism to store shortened, normalized values and to reject improperly formatted headers.

These versions are called:

  • Django 0.96.1 (replaces Django 0.96)
  • Django 0.95.2 (replaces Django 0.95.1)
  • Django 0.91.1 (replaces Django 0.91.1)

Anyone using a stable Django release should upgrade to one of these point releases immediately. These fixed versions have already been provided to maintainers of Django packages for various OS distributions and should be released shortly.

Anyone tracking Django's trunk development should use Subversion to update to at least revision [6608].

Additionally, these fixes have been committed to the various "bugfixes" branches:

Anyone running custom versions of Django should download and apply the patches directly. These patches are available at http://media.djangoproject.com/patches/2007-10-26-security-fix/.

* This post originally failed to mention that the i18n middleware component must be enabled to trigger the bug.

Posted by Jacob on October 26, 2007

Comments

Clint Ecker October 26, 2007 at 3:09 p.m.

I think the communication you guys have put together about this issue is excellent. I hope you don't find yourself having to do this many more times in the future :)

mike October 26, 2007 at 3:29 p.m.

Wow, even 0.91 got updated - THAT is support

Josh Simpson October 26, 2007 at 9:56 p.m.

Great explanation and coverage. It's really appreciated, thanks guys!

Steve Bergman October 28, 2007 at 9:26 p.m.

This was handled very professionally. I did Rails for a while. And shortly after I started, they had a security release. DHH did major hand-waving about how everyone should upgrade IMMEDIATELY! But absolutely refused to say what the problem was. (He seemed to be enjoying the cloak and dagger aspects.) I didn't have Rails apps deployed, so it didn't affect me directly. But the poor execution worried me.

One thing I like about Django is the no-nonsense, professional way that the project is run.

Cynic November 1, 2007 at noon

And we have a Favicon!!!!!!!!!!!!

Ok, ok, that didn't actually happen at the same time as the update (I just saw it today); but it still looks damn spiffy in my firefox tab : )

Georges November 2, 2007 at 5:05 a.m.

Finally the favicon!!!

Jurgen November 2, 2007 at 1:54 p.m.

Guten Tag Django Dev's, Sehr gut arbeiten.

guotie November 6, 2007 at 12:12 a.m.

最近没有进展?

Comments are closed

To prevent spam, comments are no longer allowed after sixty days.