VDB-11663 · Issue19435 · OSVDB 101497

Python 2.7.5/3.3.3 RC 1 Lib/CGIHTTPServer.py CGIHTTPRequestHandler path traversal

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.
6.6$0-$5k0.00

Summaryinfo

A vulnerability, which was classified as problematic, has been found in Python 2.7.5/3.3.3 RC 1. This vulnerability affects the function CGIHTTPRequestHandler in the library Lib/CGIHTTPServer.py. The manipulation with the input ///////////badscript.sh/../cgi-bin/cgi.sh leads to path traversal. In addition, an exploit is available. It is advisable to upgrade the affected component.

Detailsinfo

A vulnerability was found in Python 2.7.5/3.3.3 RC 1 (Programming Language Software). It has been rated as critical. This issue affects the function CGIHTTPRequestHandler in the library Lib/CGIHTTPServer.py. The manipulation with the input value ///////////badscript.sh/../cgi-bin/cgi.sh leads to a path traversal vulnerability. Using CWE to declare the problem leads to CWE-22. The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Impacted is confidentiality, integrity, and availability.

The weakness was presented 10/29/2013 by Alexander Kruppa as Issue19435 as confirmed bug report (Website). It is possible to read the advisory at bugs.python.org. The attack may be initiated remotely. No form of authentication is needed for a successful exploitation. Technical details as well as a public exploit are known. The attack technique deployed by this issue is T1006 according to MITRE ATT&CK. The following code is the reason for this vulnerability:

def run_cgi(self):    
   """Execute a CGI script."""    
   path = self.path    
   dir, rest = self.cgi_info    

   i = path.find('/', len(dir) + 1)

A public exploit has been developed by Alexander Kruppa in URL and been published immediately after the advisory. The exploit is available at bugs.python.org. It is declared as proof-of-concept. The code used by the exploit is:

(echo "GET ///////////badscript.sh/../cgi-bin/cgi.sh HTTP/1.1"; echo) | telnet localhost 4443

Upgrading to version 2.7.6 or 3.3.3 RC 2 eliminates this vulnerability. The upgrade is hosted for download at hg.python.org. A possible mitigation has been published 2 weeks after the disclosure of the vulnerability.

The vulnerability is also documented in the vulnerability database at OSVDB (101497†). Be aware that VulDB is the high quality source for vulnerability data.

Productinfo

Type

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.3
VulDB Meta Temp Score: 6.6

VulDB Base Score: 7.3
VulDB Temp Score: 6.6
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

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

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

Exploitinginfo

Class: Path traversal
CWE: CWE-22
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Alexander Kruppa
Programming Language: 🔍
Download: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

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

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

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

Upgrade: Python 2.7.6/3.3.3 RC 2

Timelineinfo

10/29/2013 🔍
10/29/2013 +0 days 🔍
11/11/2013 +13 days 🔍
12/30/2013 +49 days 🔍
11/25/2018 +1791 days 🔍

Sourcesinfo

Advisory: Issue19435
Researcher: Alexander Kruppa
Status: Confirmed

GCVE (VulDB): GCVE-100-11663
OSVDB: 101497

scip Labs: https://www.scip.ch/en/?labs.20161013

Entryinfo

Created: 12/30/2013 11:27
Updated: 11/25/2018 10:02
Changes: 12/30/2013 11:27 (55), 11/25/2018 10:02 (2)
Complete: 🔍
Cache ID: 216::103

Be aware that VulDB is the high quality source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to know what is going to be exploited?

We predict KEV entries!