Bug 696082 (CVE-2011-0705)

Summary: CVE-2011-0705 Python: SimpleHTTPServer class directory traversal flaw
Product: [Other] Security Response Reporter: Huzaifa S. Sidhpurwala <huzaifas>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: carnil, dmalcolm, katzj
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-01 06:06:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Huzaifa S. Sidhpurwala 2011-04-13 08:41:13 UTC
Python's SimpleHTTPServer class is a simple HTTP server, documented as
serving up the content of the pwd and below readonly via GET and HEAD
commands:

$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...

However, by inserting "../" path fragments within the path section of
the URL, it's possible to traverse other directories within the
filesystem.

For example:

lynx localhost:8000/../../../../..

shows 5 directories above in the directory structure.

We can also browse /proc and /sys on this example using:

lynx localhost:8000/../../../../../../../../proc
lynx localhost:8000/../../../../../../../../sys

(by browsing to find the correct number of ".." entries to locate the
root directory).

http://bugs.python.org/issue11197

Comment 2 Huzaifa S. Sidhpurwala 2011-07-01 06:06:02 UTC
http://bugs.python.org/issue11197#msg139056

suggests that this bug cannot be reproduced. 
Also SimpleHTTPServer is supposed to serve contents from the current directory and any directories below it.

Closing this issue.

Comment 6 Huzaifa S. Sidhpurwala 2011-07-01 08:31:59 UTC
This is NOT a security issue, in fact this is not a bug at all. lynx was used incorrectly. This resulted in files being viewed from the local system and not from the web.

Reference:
http://bugs.python.org/issue11197#msg139554

Comment 7 Salvatore Bonaccorso 2018-09-01 19:50:13 UTC
I asked MITRE (via the http://cveform.mitre.org/) to REJECT the CVE.

Comment 8 Doran Moppert 2020-02-11 00:27:32 UTC
Statement:

Red Hat Product Security determined that this flaw was not a security vulnerability. See the Bugzilla link for more details.