Python 2.7.5/3.3.3 RC 1 Lib/CGIHTTPServer.py CGIHTTPRequestHandler path traversal
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 6.6 | $0-$5k | 0.00 |
Summary
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.
Details
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.
Product
Type
Name
Version
License
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 7.3VulDB Meta Temp Score: 6.6
VulDB Base Score: 7.3
VulDB Temp Score: 6.6
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Path traversalCWE: 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-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Exploit Delay Time: 🔍
Upgrade: Python 2.7.6/3.3.3 RC 2
Timeline
10/29/2013 🔍10/29/2013 🔍
11/11/2013 🔍
12/30/2013 🔍
11/25/2018 🔍
Sources
Advisory: Issue19435Researcher: Alexander Kruppa
Status: Confirmed
GCVE (VulDB): GCVE-100-11663
OSVDB: 101497
scip Labs: https://www.scip.ch/en/?labs.20161013
Entry
Created: 12/30/2013 11:27Updated: 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.
No comments yet. Languages: en.
Please log in to comment.