Skip to content

CapacityBond: NodeId ownership signature has no domain separation and is replayable across calls #2699

Not planned

Description

@thiras

Source: GHSA-jr93-46mf-88wx (low bundle, internal audit at 772c8f4, re-confirmed on main).

The Ed25519 NodeId ownership digest in CapacityBond is keccak256(abi.encodePacked(nodeId, msg.sender, block.chainid, nonce)) (contracts/src/CapacityBond.sol:933-940). It has no domain tag and no address(this). Also, registerNode reads registrationNonce but never increments it. The same signature therefore validates again in reclaimNodeId and bindNodeId for the same sender (:1028-1049). It also replays across deployments on the same chain, where nonces restart at 0.

  • Add a domain tag and address(this) to the digest (and to the Rust signer that produces it)
  • Bump registrationNonce on every operation that consumes an ownership signature
  • Foundry test: a registration signature does not validate in reclaimNodeId or bindNodeId

Activity

  1. added
    kind:security
    prio:low
    area:contracts
    on Oct 28, 2026
  2. alpergundogdu commented on Nov 27, 2026

    @alpergundogdu
    Contributor

    Closing as superseded: registration and tokenomics are being redesigned, so this no longer applies to the contracts we will ship. Reopen if it is still relevant after the redesign.

  3. moved this from Backlog to Done in deCDNon Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:contractskind:securityprio:low

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions