Skip to content

[security] Spoofing Hostname leads to Write-Access on any system #48

Description

@cHolzberger

host = self.headers.get("Host", "").split(":")[0]

You can spoof the localhost hostname from any system able to connect to gitweb and by this code anyone able to access webui by the hostname "localhost" have writeaccess.

Curl Example:
curl 'http://192.168.X.X:8000/viewonly' -H "Host: localhost" -> 0

Also accessing localhost by another Hostname results in no write access
curl 'http://localhost:8000/viewonly' -H "Host: exthost" -> 1

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