Django remedy a security issue refer dos attack
Today the Django team is issuing multiple releases -- Django 1.4.8, Django 1.5.4, and Django 1.6 beta 4 -- to remedy a security issue which was disclosed publicly by a third party earlier today. These releases are now available on PyPI and our download page.
These releases address a denial-of-service attack against Django's authentication framework. All users of Django are encouraged to upgrade immediately.
Release outside of normal security process
Normally, our security process involves a one-week lead time for third parties on our security prenotification list. That process, however, relies on responsible disclosure practices which maintain confidentiality of a security issue until a coordinated public release date. To facilitate that, we ask that potential security issues always be reported via email to security@djangoproject.com, rather than through public channels such as Django's ticket tracker or the django-developers mailing list.
This issue, unfortunately, could not be handled by our normal process, as it was first reported publicly on the django-developers mailing list. It has since been confirmed by the Django core team, and due to the already-public nature of the issue and the potential to impact live deployments of Django, we are instead issuing security releases immediately.
Issue: denial-of-service via large passwords
Django's authentication framework -- django.contrib.auth -- includes a default User model and backend which authenticates via username and password. The raw password is not stored in the database; instead, a hashed version of the password is stored, and the hash is computed each time a user attempts to log in. The hasher to use is configurable, via the PASSWORD_HASHERS setting.
The default password hasher in Django is PBKDF2, which has the virtue of allowing the complexity of computing the hash to be effectively arbitrarily high, by repeated "rounds" of application before producing the final result. This increases the difficulty of attacks which use brute-force methods to compute the hashes of many possible plaintext values, in hopes of discovering which plaintext password corresponds to a given hashed value.
Unfortunately, this complexity can also be used as an attack vector. Django does not impose any maximum on the length of the plaintext password, meaning that an attacker can simply submit arbitrarily large -- and guaranteed-to-fail -- passwords, forcing a server running Django to perform the resulting expensive hash computation in an attempt to check the password. A password one megabyte in size, for example, will require roughly one minute of computation to check when using the PBKDF2 hasher.
This allows for denial-of-service attacks through repeated submission of large passwords, tying up server resources in the expensive computation of the corresponding hashes.
Although this is most effective against algorithms which are designed to be relatively "slow" to compute, such as PBKDF2 (which, again, is the default hasher in Django's authentication framework), it also is effective against other hashers, as the time to compute the hash generally grows with the size of the password.
To remedy this, Django's authentication framework will now automatically fail authentication for any password exceeding 4096 bytes.
Affected versions
- Django master development branch
- Django 1.6 (currently at beta status)
- Django 1.5
- Django 1.4
At the time of this writing, efforts are being made to obtain a CVE for this issue. This post will be updated with the CVE once it has been obtained.
Update: this issue was assigned CVE-2013-1443.
Resolution
Patches have been applied to Django's master development branch, and to the 1.6, 1.5 and 1.4 release branches, which resolve the issue described above. The patches may be obtained directly from the following changesets:
- master development branch
- 1.6 release branch
- 1.5 release branch
- 1.4 release branch and additional commit for Python 2.5 compatibility
The following new releases have been issued:
- Django 1.6 beta 4 (download Django 1.6b4 | 1.6b4 checksums)
- Django 1.5.4 (download Django 1.5.4 | 1.5.4 checksums)
- Django 1.4.8 (download Django 1.4.8 | 1.4.8 checksums)
General notes regarding security reporting
As always, we ask that potential security issues be reported via private email to security@djangoproject.com, and not via Django's Trac instance or the django-developers list. If you think you may have found a security issue but aren't sure, we urge you to err on the side of caution, and report via email rather than public channels. Please see our security policies for further information.
Posted by James Bennett on September 15, 2013
Django remedy a security issue refer dos attack的更多相关文章
- Web 服务器 low bandth DOS attack
https://www.owasp.org/images/0/04/Roberto_Suggi_Liverani_OWASPNZDAY2010-Defending_against_applicatio ...
- C++ security issue analyze
https://sploitfun.wordpress.com/about-2/ “Happiness is only real when shared” – Into the wild http:/ ...
- Django : Security in Django
Security in Django https://docs.djangoproject.com/en/1.10/topics/security/ 1 Cross site scripting (X ...
- A Study of WebRTC Security
转自:http://webrtc-security.github.io/ A Study of WebRTC Security Abstract Web Real-Time Communication ...
- Security Checklist (路由器安全checklist)
Security Checklist Website by Michael Horowitz Home | Introduction | Router Bugs | Security Che ...
- Django Model field reference
===================== Model field reference ===================== .. module:: django.db.models.field ...
- Network Security Threats
Network Security Combination of low-cost powerful computing and high-performance networks is a two-e ...
- Awesome Django
Awesome Django If you find Awesome Django useful, please consider donating to help maintain it. ...
- Even uploading a JPG file can lead to Cross-Site Content Hijacking (client-side attack)!
Introduction: This post is going to introduce a new technique that has not been covered previously i ...
随机推荐
- clone项目到本地
clone项目到本地 1.然后在本地建立接受代码的文件夹,然后cd 到这个目录 (克隆版本库的时候,所使用的远程主机自动被git命名为origin.如果想用其他的主机名,需要用git clone命令的 ...
- Ubuntu如何进入命令模式
Ctrl+Alt+T 或者Ctrl+Alt+F2~F6进入命命令模式 Ctrl+Alt+F7返回桌面
- jetty maven插件
<plugins> <plugin> <groupId>org.eclipse.jetty</groupId> <artifact ...
- PHP+AJAX 实现表格实时编辑
https://blog.csdn.net/qq_29627497/article/details/81365107 源码链接:https://pan.baidu.com/s/1fAinVXU-nWt ...
- 算法(1)K-diff Pairs in an Array
写在前面:研究操作系统,习惯了用C,但是在做算法题甚至构建大型系统时,C真的是噩梦.还是用C++比较好,基本算法很成熟,并可基于此实现更复杂的算法.那就边写算法边捡起来好久不用的C++吧! 题目:数组 ...
- P2574 XOR的艺术
题目描述 AKN觉得第一题太水了,不屑于写第一题,所以他又玩起了新的游戏.在游戏中,他发现,这个游戏的伤害计算有一个规律,规律如下 1. 拥有一个伤害串为长度为n的01串. 2. 给定一个范围[l,r ...
- Js跑马灯效果 && 在Vue中使用
DEMO: <!DOCTYPE html><html> <head> <title>滚动播报</title> <meta charse ...
- [MySQL] explain执行计划解读
Explain语法 EXPLAIN SELECT …… 变体: 1. EXPLAIN EXTENDED SELECT …… 将执行计划“反编译”成SELECT语句,运行SHOW WARNINGS 可得 ...
- Codeforces ----- Kefa and Dishes [状压dp]
题目传送门:580D 题目大意:给你n道菜以及每道菜一个权值,k个条件,即第y道菜在第x道后马上吃有z的附加值,求从中取m道菜的最大权值 看到这道题,我们会想到去枚举,但是很显然这是会超时的,再一看数 ...
- BZOJ1191:超级英雄(二分图匹配)
[HNOI2006]超级英雄Hero 题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=1191 Description: 现在电视台有一种节 ...