Skip to content

node: admin JSON-RPC server has no Host/Origin filter (DNS rebinding reaches evict and drain) #2690

Closed

Description

@thiras

Source: GHSA-wf7x-w272-2vwg (M6, internal audit at 772c8f4, re-confirmed on main).

The admin JSON-RPC server is built with only ServerConfig::builder().max_connections(MAX_ADMIN_CONNECTIONS).http_only().build() (crates/node/src/admin.rs:1283-1291). It has no set_http_middleware, no Host or Origin check, and no batch-size cap. A web page that the operator opens can reach the loopback admin port through DNS rebinding. It can then call evict (crates/common/src/admin.rs:859), which is persisted to evicted.log and survives a restart, and drain (:895), which shuts the node down. The warning about a non-loopback bind (admin.rs:1241-1257) does not help against rebinding to 127.0.0.1.

  • Add a jsonrpsee HostFilterLayer that allows only 127.0.0.1:<port> / localhost:<port> (plus the configured bind address)
  • Reject any request that carries an Origin header
  • Cap the batch size
  • Test: a request with a foreign Host or any Origin is refused

Activity

  1. added
    kind:security
    prio:medium
    area:node
    on Oct 28, 2026
  2. added this to the v0.3 milestone on Oct 28, 2026
  3. self-assigned this
    on Oct 28, 2026
  4. moved this from Backlog to In progress in deCDNon Oct 28, 2026
  5. moved this from In progress to Done in deCDNon Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodekind:securityprio:medium

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions