Image AI-generated by in the Crypto Shots server
I recently volunteered to test a Hive Dapp (that won't be named at the very least until all the flagged issues are resolved).
Use these to ensure that your own Hive frontend has protections in place for things like these.
Stay tuned for my guide on how to build Secure Hive Applications !
It should be out around mid-July with links to a test repo.
Missing sanitization for SVG files.
The following snippet was able to trigger the code execution every time the page was visited:
<div>
<svg width="200px" height="200px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<script type="text/ecmascript">
alert(1)
</script>
<circle cx="100" cy="100" r="80" fill="green"></circle>
</svg>
</div>
To learn more about XSS vulnerabilities see:
https://owasp.org/www-community/attacks/xss
Triggered a redirect: <meta http-equiv="refresh" content="0;URL=https://google.com">
Did not execute: <meta http-equiv="refresh" content="0;URL=javascript:alert()">
To learn more about malicious redirect see:
https://learn.snyk.io/lesson/open-redirect
Exploit:
This can be used to redirect to a page very similar to yours and it could prompt you to start any operations (eg. transfer) from your Hive Keychain masking it as a simple login.
This is what gets generated for all image uploads...

Note the ?pinataGatewayToken URL parameter.
Impact:
Less critical ones...
An attacker can simply embed full-screen your website as is and display an overlay with invisible fields on top of the real login fields, in order to steal users' credentials.
Or they could show an overlay with an amazing offer to subscribe to your services with a huge discount by paying with a credit card or sending funds to the attacker's account.
To learn more about clickjacking:
https://owasp.org/www-community/attacks/Clickjacking
<a href="https://peakd.com" target="_blank">test</a>
None of the external links have rel=“noopener noreferrer” to protect from it.
To learn more about reverse tabnabbing:
https://owasp.org/www-community/attacks/Reverse_Tabnabbing
That's all folks.
Stay tuned for my guide on Securing your Hive Apps!
Keys-Defender features:
This project is sponsored by
Browser-based play-to-earn 3D Shooter on HIVE