Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cHolzberger opened this issue Sep 29, 2019 · 0 comments · May be fixed by #49
Open

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

cHolzberger opened this issue Sep 29, 2019 · 0 comments · May be fixed by #49

Comments

@cHolzberger
Copy link

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

@cHolzberger cHolzberger changed the title Spoofing Hostname leads to Write-Access on any system [security] Spoofing Hostname leads to Write-Access on any system Sep 29, 2019
cHolzberger added a commit to cHolzberger/git-webui that referenced this issue Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant