vielite's blog

QA-09: ConsensusMessage Late Version Validation Allows Resource Exhaustion

March 25, 2026
0 min read
Table of Contents
monad-qa-09-late-version-validation

Summary

ConsensusMessage uses derived RLP decoding, which means nested protocol payloads are decoded before the version field is rejected.

Vulnerability details

2025-09-monad/bft/monad-consensus/src/messages/consensus_message.rs
#[derive(Clone, Debug, PartialEq, Eq, RlpEncodable, RlpDecodable)]
pub struct ConsensusMessage<ST, SCT, EPT>
where
ST: CertificateSignatureRecoverable,
SCT: SignatureCollection<NodeIdPubKey = CertificateSignaturePubKey<ST>>,
EPT: ExecutionProtocol,
{
pub version: u32,
pub message: ProtocolMessage<ST, SCT, EPT>,
}
2025-09-monad/bft/monad-consensus/src/validation/signing.rs
if msg_version != client_version {
return Err(Error::InvalidVersion);
}

Impact

A peer can send oversized wrong-version messages that still trigger heavy nested decoding work before the node returns InvalidVersion.

Recommendation

Implement a manual decoder that validates the version first and decodes the expensive payload only after that check passes.