Skip to content

Fix: Enforce fail-closed engine authentication and secure RPC defaults in node entrypoint - #1169

Open
mozluk wants to merge 1 commit into
base:mainfrom
mozluk:aa
Open

Fix: Enforce fail-closed engine authentication and secure RPC defaults in node entrypoint#1169
mozluk wants to merge 1 commit into
base:mainfrom
mozluk:aa

Conversation

@mozluk

@mozluk mozluk commented Aug 18, 2026

Copy link
Copy Markdown

This PR hardens the node's execution entrypoint by implementing strict input validation for the L2 engine secret and reducing the default unauthenticated RPC attack surface, addressing the vulnerabilities identified in the workspace security audit.

Engine Authentication Validation:

  • Added strict fail-closed validation for BASE_NODE_L2_ENGINE_AUTH_RAW in node/execution-entrypoint. The node startup will now safely exit with an error if the provided value is absent or not exactly 64 hexadecimal characters, preventing the engine from running with malformed authentication material.

RPC Attack Surface & Cross-Origin Protection:

  • Restricted the default privileged HTTP and WebSocket APIs. The entrypoint now securely defaults to web3,eth,net instead of exposing debug, txpool, and miner namespaces automatically.
  • Replaced wildcard (*) HTTP CORS and WebSocket origins with a restricted default of http://localhost. Operators can still explicitly configure these via the RETH_HTTP_CORS_DOMAINS and RETH_WS_ORIGINS environment variables.

…s in node entrypoint


This PR hardens the node's execution entrypoint by implementing strict input validation for the L2 engine secret and reducing the default unauthenticated RPC attack surface, addressing the vulnerabilities identified in the workspace security audit.

**Engine Authentication Validation:**
* Added strict fail-closed validation for `BASE_NODE_L2_ENGINE_AUTH_RAW` in `node/execution-entrypoint`. The node startup will now safely exit with an error if the provided value is absent or not exactly 64 hexadecimal characters, preventing the engine from running with malformed authentication material.

**RPC Attack Surface & Cross-Origin Protection:**
* Restricted the default privileged HTTP and WebSocket APIs. The entrypoint now securely defaults to `web3,eth,net` instead of exposing `debug`, `txpool`, and `miner` namespaces automatically.
* Replaced wildcard (`*`) HTTP CORS and WebSocket origins with a restricted default of `http://localhost`. Operators can still explicitly configure these via the `RETH_HTTP_CORS_DOMAINS` and `RETH_WS_ORIGINS` environment variables.
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants