Directory traversal using specially crafted HTTP headers

Bug #959477 reported by Corbin
256
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HTTPy
Fix Released
Critical
Corbin

Bug Description

Modern web browsers ignore "../" in the URL, and just send the request without them, making the server seem secure. But sending requests to the server without a web browser allows you to put anything in the headers that you want.

Using python sockets, I was able to get a copy of the host's /etc/passwd file. My header was quite simple:

"GET /../../../../../../../../etc/passwd HTTP/1.1\r\n\n"

And the server simply responded with a "200 OK" header, and the host's /etc/passwd file.

If the daemon is running as root, an attacker will be able to look at virtually any file in the file system. This is a serious problem, and should be addressed before the first release of HTTPy.

Corbin (corbin)
description: updated
description: updated
Corbin (corbin)
visibility: private → public
Corbin (corbin)
Changed in httpy:
status: New → Confirmed
Corbin (corbin)
Changed in httpy:
status: Confirmed → Fix Committed
Revision history for this message
Corbin (corbin) wrote :

The "fix" in revision 8 did not fix it at all. An attacker has to use "....//" instead of "../" and it is vulnerable again. Reopening.

Changed in httpy:
status: Fix Committed → Confirmed
Corbin (corbin)
Changed in httpy:
importance: High → Critical
Revision history for this message
Corbin (corbin) wrote :

As this blocks release, I have updated its priority to critical.

Corbin (corbin)
Changed in httpy:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.