Cross-Site Request Forgery (CSRF) in kestasjk/webdiplomacy

Valid

Reported on

Jul 23rd 2021


✍️ Description

CSRF bug to watch a game

🕵️‍♂️ Proof of Concept

no csrf token checking during watch game.
Bellow request is vulnerable to csrf attack

POST /redirect.php HTTP/1.1
Host: webdiplomacy.net
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 33
Origin: https://webdiplomacy.net
Connection: close
Referer: https://webdiplomacy.net/gamelistings.php?gamelistType=Search&phaseLengthMax=30m&messageNorm=Yes&messagePub=Yes&messageNon=Yes&messageRule=Yes&Submit=Search
Cookie: ;...
Upgrade-Insecure-Requests: 1

gameID=368045&watch=Spectate+game

💥 Impact

csrf bug

We have contacted a member of the kestasjk/webdiplomacy team and are waiting to hear back 4 months ago
Kestas
4 months ago

Maintainer


Okay be sure not to disclose this 0day to anyone until I've submitted a patch. If anyone finds out, and can trick someone else into visiting a URL, they might make someone unspectate a game they were watching. I think we might need to alert the government :)

Kestas "Chris" Kuliukas validated this vulnerability 4 months ago
ranjit-git has been awarded the disclosure bounty
The fix bounty is now up for grabs
Kestas "Chris" Kuliukas confirmed that a fix has been merged on 6911bb 4 months ago
Kestas "Chris" Kuliukas has been awarded the fix bounty