Skip to content

[security] Freeze CapacityBond.setSlashJudge — prevent malicious-judge slashing #2029

Closed

Description

@alpergundogdu

Summary

CapacityBond.setSlashJudge (GOVERNANCE_ROLE) lets governance swap the SlashJudge for an attacker-controlled contract that fabricates slashes against honest operators.

Impact

  • A malicious judge can slash honest/competitor operators, burning their bonds (50% burn / 50% challenger via SlashEscrowLib) and stripping their vote weight — this attacks the electorate itself.
  • Appeals are decided by governance (SlashAppeal.grantAppeal/upholdAppeal), so a captured governance both slashes and denies the appeal. Recovery is hard → tends toward fork-only.

Fix

Wire the SlashJudge immutable at deploy (constructor-set, delete setSlashJudge). The slash-evidence surface is already fixed by the judge's logic; there's no benign reason to hot-swap the judge on immutable contracts (replace = redeploy).

Acceptance criteria

  • No governance path can change the SlashJudge a CapacityBond trusts.
  • Test: swap attempt reverts / is compiled out.

Activity

  1. added
    kind:security
    prio:high
    on Sep 15, 2026
  2. moved this from Backlog to In progress in deCDNon Sep 15, 2026
  3. moved this from In progress to Done in deCDNon Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:securityprio:high

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions