Boost _ Shardeum_ Ancillaries 34367 - [Websites and Applications - Low] CSRF vulnerability due to mi
Description
Brief/Intro
Vulnerability Details
router.route('/:passphrase').get(async function (req: Request, res: Response) {
const { passphrase } = req.params
const payload = { user: 'shardeum-dev' }
if (passphrase === CONFIG.passphrase) {
// token don't expire, usually this is bad practice
// for the case being implementing refresh token is overkill
// stolen token worst case scenario our debug data ended up being not useful.
const token = jwt.sign(payload, CONFIG.secret_key)
res.cookie('access_token', token, {
httpOnly: false,
maxAge: 1000 * 60 * 60 * 700, // ~ a month
})
return res.send({ token: token, message: 'authenticated and authorized for debug api calls' }).status(200)
}
return res.send({ message: 'wrong passphrase' }).status(400)
})Impact Details
References
Proof of concept
Proof of Concept
Steps to Reproduce
PreviousBoost _ Shardeum_ Ancillaries 34298 - [Websites and Applications - Medium] archive-server can be kilNextBoost _ Shardeum_ Ancillaries 34392 - [Websites and Applications - Medium] JSON-RPC Complete Passwor
Last updated
Was this helpful?