humitos / pyfispot

Hotspot running with Python 2.7 + Flask + nginx + uWSGI + dnsmasq + hostapd
GNU General Public License v2.0
60 stars 23 forks source link

This application is vulnerable #25

Open ChiChou opened 6 years ago

ChiChou commented 6 years ago

There's a easy exploiting vulnerability in: https://github.com/humitos/pyfispot/blob/master/raspberrypi/home/pi/apps/pyfispot/main.py#L69

A fake X-Real-IP header will execute arbitrary command on the server

humitos commented 6 years ago

Thanks for your report. You are right.

We will need to validate that the request.remote_addr is a valid IP. Maybe with a regex? Would you like to propose a PR for this?