Boost _ Shardeum_ Ancillaries 34367 - [Websites and Applications - Low] CSRF vulnerability due to missing SameSiteStrict attribute resulting blackhat to perform authenticated action
Last updated
Was this helpful?
Last updated
Was this helpful?
Submitted on Sat Aug 10 2024 12:56:34 GMT-0400 (Atlantic Standard Time) by @hulkvision for
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.
The access-token was missing SameSite=Strict
attribute which leads to CSRF vulnerability resulting in allowing BlackHat to perform authenticated actions.
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.
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.
https://github.com/shardeum/json-rpc-server/blob/d799a64c1ab4a7cffdf472a8be689fe7afb993e9/src/routes/authenticate.ts#L15-L18
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 automatically
You will see a response {"success":true}