Skip to content

[submit] connect() does not reject http:// scheme — signed tx bytes leak in plaintext #194

@obchain

Description

@obchain

Refs #44

File: crates/charon-executor/src/submit.rs (Submitter::connect)

Problem

connect() rejects malformed URLs but does not validate scheme. An operator who sets BSC_PRIVATE_RPC_URL to http://... (instead of https://) causes signed transaction bytes to traverse the network unencrypted. MEV searchers running mitm-friendly network paths can extract the signed envelope, recover sender + nonce + calldata, and front-run.

Impact

Signed liquidation envelopes leak in plaintext. Equivalent to public-mempool broadcast plus signature exposure.

Fix

In connect(), assert url.scheme() == "https" or "wss" and return SubmitError::InsecureScheme otherwise. Add unit test covering http://, ws://, ftp://, and missing scheme.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglayer:rustRust crates (core / scanner / protocols / executor / cli)pr-reviewFindings from PR review processpriority:p0-blockerBlocks the critical pathstatus:readyScoped and ready to pick up

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions