Skip to content

Auth signature does not bind method, path, or body — LOW/MEDIUM #447

Description

@DQiash

Description

In bitvm-node/node/src/rpc_service/auth.rs, the authentication hash covers only the auth domain (b"bitvm2-auth") and the timestamp string. It does not bind the HTTP method, path, or body, so a valid signature can be replayed across endpoints within the 300-second replay window (AUTH_WINDOW_SECS).

Affected component(s)

  • bitvm-noderpc_service/auth.rs
  • Scope area: Bridge State Machine (API)

Steps to reproduce

  1. Capture a valid signed request (e.g. pegout).
  2. Within the 300s window, replay the same signature against send_challenge (or vice versa).

Proof of concept

hasher.update(AUTH_DOMAIN);            // b"bitvm2-auth"
hasher.update(timestamp_str.as_bytes()); // does not bind method/path/body!

Security impact

Cross-endpoint signature replay within the replay window. An attacker cannot forge a signature; they must intercept a valid one in the window, so this is Low/Medium. Recommended fix: include method, path, and a body hash in the signed payload.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions