Python 2.6.8/2.7.3/3.3.2 HTTP read_status HTTP Header denial of service

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
7.2$0-$5k0.00

Summaryinfo

A vulnerability classified as problematic has been found in Python 2.6.8/2.7.3/3.3.2. The affected element is the function read_status of the component HTTP Handler. The manipulation as part of HTTP Header leads to denial of service. This vulnerability is listed as CVE-2013-1752. There is no available exploit. It is recommended to upgrade the affected component.

Detailsinfo

A vulnerability was found in Python 2.6.8/2.7.3/3.3.2 (Programming Language Software) and classified as critical. This issue affects the function read_status of the component HTTP Handler. The manipulation as part of a HTTP Header leads to a denial of service vulnerability. Using CWE to declare the problem leads to CWE-404. The product does not release or incorrectly releases a resource before it is made available for re-use. Impacted is availability.

The weakness was presented 09/25/2012 by Christian Heimes with OUSPG as Issue16037 as confirmed bug report (Website). The advisory is shared at bugs.python.org. The identification of this vulnerability is CVE-2013-1752 since 02/15/2013. The attack may be initiated remotely. No form of authentication is needed for a successful exploitation. Technical details are known, but no exploit is available. The advisory points out:

The httplib module / package can read arbitrary amounts of data from its socket when it's parsing the HTTP header. This may lead to issues when a user connects to a broken HTTP server or something that isn't a HTTP at all. The issue can be broken up into two parts: parsing the HTTP status line parsing and parsing the remaining HTTP headers.

The vulnerability scanner Nessus provides a plugin with the ID 75315 (openSUSE Security Update : python3 (openSUSE-SU-2014:0498-1)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family SuSE Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 350081 (Amazon Linux Security Advisory for python26: ALAS-2015-621).

Upgrading to version 2.7.4, 2.6.9 or 3.3.3 eliminates this vulnerability. The upgrade is hosted for download at hg.python.org. A possible mitigation has been published immediately after the disclosure of the vulnerability. The vulnerability will be addressed with the following lines of code:

--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -362,7 +362,9 @@

     def _read_status(self):
         # Initialize with Simple-Response defaults
-        line = self.fp.readline()
+        line = self.fp.readline(_MAXLINE + 1)
+        if len(line) > _MAXLINE:
+            raise LineTooLong("header line")
         if self.debuglevel > 0:
             print "reply:", repr(line)
         if not line:
The bug report contains the following remark:
Reading and parsing of the HTTP status line is already limited in Python 3.x. Python 2.7 and lower may read arbitrary amounts of bytes from the socket until it finds a newline char. (…) Both Python 2 and Python 3 accept an unlimited count of HTTP headers with a maximum length of 64k each. As headers are accumulated in an list it may consume lots of memory. I suggest that we limit the maximum amount of HTTP header lines to a sane value. How does 100 sound to you?

The vulnerability is also documented in the databases at X-Force (90056), Tenable (75315), SecurityFocus (BID 61050†), OSVDB (101386†) and Secunia (SA56226†). See VDB-11628, VDB-11629, VDB-11630 and VDB-11631 for similar entries. Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Productinfo

Type

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.5
VulDB Meta Temp Score: 7.2

VulDB Base Score: 7.5
VulDB Temp Score: 7.2
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Denial of service
CWE: CWE-404
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 75315
Nessus Name: openSUSE Security Update : python3 (openSUSE-SU-2014:0498-1)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍
Nessus Port: 🔍

OpenVAS ID: 14611
OpenVAS Name: Amazon Linux Local Check: alas-2015-621
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍

Upgrade: Python 2.7.4/2.6.9/3.3.3

Timelineinfo

09/25/2012 🔍
09/25/2012 +0 days 🔍
02/15/2013 +143 days 🔍
07/09/2013 +144 days 🔍
12/27/2013 +171 days 🔍
12/27/2013 +0 days 🔍
04/04/2014 +98 days 🔍
06/13/2014 +70 days 🔍
03/29/2016 +655 days 🔍
02/03/2019 +1041 days 🔍

Sourcesinfo

Advisory: Issue16037
Researcher: Christian Heimes
Organization: OUSPG
Status: Confirmed

CVE: CVE-2013-1752 (🔍)
GCVE (CVE): GCVE-0-2013-1752
GCVE (VulDB): GCVE-100-11633

OVAL: 🔍

X-Force: 90056
SecurityFocus: 61050 - Google Chrome CVE-2013-2877 Out of Bounds Denial of Service Vulnerability
Secunia: 56226 - Python Multiple Vulnerabilities, Less Critical
OSVDB: 101386
Vulnerability Center: 57793 - Python SSL Module Remote DoS due to Unlimited readline() Function Call, Medium

See also: 🔍

Entryinfo

Created: 12/27/2013 23:38
Updated: 02/03/2019 10:15
Changes: 12/27/2013 23:38 (76), 02/03/2019 10:15 (8)
Complete: 🔍
Cache ID: 216::103

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you need the next level of professionalism?

Upgrade your account now!