AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 51 Bitcoin

http: check rpcallowip immediately after accepting connection

Public commit record

What the developer wrote

Authored by Matthew Zipkin

83/100 · Strong
http: check rpcallowip immediately after accepting connection

Instead of sending 403 Forbidden, disconnect as soon as possible.

To facilitate unit testing, this commit includes a refactor
that moves the subnet allow list and relevant methods
into the HTTPServer class instead of file-scope static scope.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This Bitcoin Core change moves the IP allow-list check for RPC connections so it happens immediately when a connection is accepted, rather than after the server has already started processing the HTTP request. Previously, a blocked client would receive a '403 Forbidden' response; now the connection is simply closed. This is a hardening improvement, not a fix for an active vulnerability, and it reduces the attack surface from disallowed IP addresses by cutting them off earlier.

Recommended action

Review as a routine hardening improvement. No urgent action required. Operators relying on the previous behavior of receiving HTTP 403 from disallowed RPC clients should note that connections will now be closed without response. Ensure -rpcallowip configuration remains correct after upgrade.

Security signals we found

01

Defense-in-depth: ACL enforcement moved earlier in connection lifecycle

02

Behavior change: disallowed clients no longer receive an HTTP 403 response; connection is closed at accept time

03

Refactor of security-critical access-control state from global static to class member

04

New assertions added to ensure allow list is populated before socket handler runs

05

Functional tests updated to expect disconnection instead of 403 Forbidden

Risk score

Why this scored 51/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 10/15
Affected reach 10/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.