Boost _ Shardeum_ Ancillaries 34367 - [Websites and Applications - Low] CSRF vulnerability due to missing SameSiteStrict attribute resulting blackhat to perform authenticated action
Submitted on Sat Aug 10 2024 12:56:34 GMT-0400 (Atlantic Standard Time) by @hulkvision for Boost | Shardeum: Ancillaries
Report ID: #34367
Report type: Websites and Applications
Report severity: Low
Target: https://github.com/shardeum/json-rpc-server/tree/dev
Impacts:
CSRF vulnerability allowing blackhat to perform authenticated actions
Changing sensitive details of other users (including modifying browser local storage) without already-connected wallet interaction and with up to one click of user interaction, such as: Email, Password of the victim etc.
Description
Brief/Intro
The access-token was missing SameSite=Strict
attribute which leads to CSRF vulnerability resulting in allowing BlackHat to perform authenticated actions.
Vulnerability Details
In src/routes/authenticate.ts
After authenticating the rpc server does not define SameSite=Strict
cookie restriction, which results in allowing malicious websites to call authenticated GET
API which perform actions like purging tables,modifying config values, node subscription etc.
Impact Details
The vulnerability allows malicious websites performing actions like purging tables,modifying config values, node subscription etc.
The vulnerability could result in deletion of debug data.
References
https://github.com/shardeum/json-rpc-server/blob/d799a64c1ab4a7cffdf472a8be689fe7afb993e9/src/routes/authenticate.ts#L15-L18
Proof of concept
Proof of Concept
Steps to Reproduce
Authenticate to RPC server with password
Save the poc file as
csrfpoc.html
Open
csrfpoc.html
from the browser you have authenticated with RPC server.Either click on
Click here to attack
or wait 3 second for attack to happen automaticallyYou will see a response
{"success":true}
Last updated