32982 - [BC - Critical] Crashing all Validators Vulnerability in eth_g...
Description
Brief/Intro
Vulnerability Details
shardus.registerExternalGet('eth_getBlockByHash', externalApiMiddleware, async (req, res) => {
/* eslint-disable security/detect-object-injection */
let blockHash = req.query.blockHash as string
if (blockHash === 'latest') blockHash = readableBlocks[latestBlock].hash
else if (blockHash.length !== 66 || !isHexString(blockHash))
return res.json({ error: 'Invalid block hash' })
if (ShardeumFlags.VerboseLogs) console.log('Req: eth_getBlockByHash', blockHash)
const blockNumber = blocksByHash[blockHash]
return res.json({ block: readableBlocks[blockNumber] })
/* eslint-enable security/detect-object-injection */
})Attack Vector
Impact Details
Proof of Concept
Previous32942 - [BC - Low] The ChainID and URL parameters that can modify ...Next32993 - [BC - Critical] Crashing Validators by triggering an uncaught e...
Last updated
Was this helpful?