Lucene search

K
huntrWtwverAC7FD77B-B31B-4D02-AEBD-F89ECBAE3FCE
HistorySep 01, 2021 - 6:43 p.m.

Sensitive Cookie Without 'HttpOnly' Flag in pi-hole/adminlte

2021-09-0118:43:44
wtwver
www.huntr.dev
9

0.002 Low

EPSS

Percentile

54.9%

✍️ Description

Please enter a description of the vulnerability.
The cookie persistentlogin is set without httponly flag

🕵️‍♂️ Proof of Concept

Enable remember me during Login

POST /admin/index.php?login HTTP/1.1
Host: 192.168.159.138
Content-Length: 30
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/index.php?login
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: PHPSESSID=qfv8v7h8r6jrfsark4in9ia2ue
Connection: close

pw=***&persistentlogin=on
HTTP/1.1 302 Found
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=***; path=/; HttpOnly
Set-Cookie: persistentlogin=***; expires=Wed, 08-Sep-2021 18:36:11 GMT; Max-Age=604800
Location: index.php
Content-type: text/html; charset=UTF-8
X-Pi-hole: The Pi-hole Web interface is working!
X-Frame-Options: DENY
Content-Length: 0
Connection: close
Date: Wed, 01 Sep 2021 18:36:11 GMT
Server: lighttpd/1.4.53

💥 Impact

Steal cookies with XSS.

0.002 Low

EPSS

Percentile

54.9%

Related for AC7FD77B-B31B-4D02-AEBD-F89ECBAE3FCE