0xMiden / 0xMiden/protocol

bug: ProposedBlock::Deserializable skips all validation in read_from validation bypass via deserialization

Open
#3,185 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
132
Forks
167
Avg merge
1d 23h
Merged PRs (30d)
110

Description

### Packages versions

miden-protocol: next branch

### Bug description

ProposedBlock::read_from constructs the struct directly without calling new_at, so all validation is skipped during deserialization.

This is unlike ProposedBatch::read_from which correctly calls new_batch_inner.

Skipped checks: duplicate batches, timestamp monotonicity, batch expiration, chain consistency, NoteTracker (duplicate notes, circular deps, unauthenticated note auth), nullifier witnesses, account update consistency.

Impact: A corrupted/malicious serialized block passes deserialization and only fails later (or not at all), causing late failure and confusing errors.

### How can this be reproduced?

1. Serialize a valid ProposedBlock
2. Corrupt it (e.g., duplicate a batch ID)
3. Deserialize with read_from_bytes()
4. It succeeds validation skipped!
5. Only fails later when into_header_and_body() is called

ProposedBatch does this correctly by calling new_batch_inner in read_from. ProposedBlock should do the same with new_at.

### Relevant log output

```shell
No logs structural code issue.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.