Skip to content
This repository was archived by the owner on Sep 8, 2026. It is now read-only.
This repository was archived by the owner on Sep 8, 2026. It is now read-only.

Bug: default Engine API JWT secret is hardcoded while authrpc binds to 0.0.0.0 #1086

Closed as not planned

Description

@mssystem1

The default node configuration includes a hardcoded BASE_NODE_L2_ENGINE_AUTH_RAW value. The Reth entrypoint writes this value into the JWT file used by --authrpc.jwtsecret, while also starting authrpc on 0.0.0.0.

This means every node using the default configuration shares the same Engine API JWT secret.

Although docker-compose.yml does not publish port 8551 by default, this is still a dangerous default for operators using host networking, Kubernetes, custom compose files, manual port mappings, or shared Docker networks. If authrpc becomes reachable, the JWT secret is already public because it is committed in the repository.

Activity

  1. mssystem1 commented on May 18, 2026

    @mssystem1
    Author

    Steps:

    1. Open .env.mainnet

    2. Notice that BASE_NODE_L2_ENGINE_AUTH_RAW is set to a fixed hardcoded value:

      BASE_NODE_L2_ENGINE_AUTH_RAW=688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a

    3. Open reth/reth-entrypoint

    4. Notice that the entrypoint writes the raw value into the JWT file:

      echo "$BASE_NODE_L2_ENGINE_AUTH_RAW" > "$BASE_NODE_L2_ENGINE_AUTH"

    5. In the same file, notice that Reth starts authrpc on all interfaces:

      --authrpc.addr=0.0.0.0
      --authrpc.port="$AUTHRPC_PORT"
      --authrpc.jwtsecret="$BASE_NODE_L2_ENGINE_AUTH"

    6. Run the node with default env values

    7. Any deployment that exposes authrpc port 8551, uses host networking, or places untrusted services on the same network now uses a public, shared JWT secret

  2. mssystem1 commented on May 18, 2026

    @mssystem1
    Author

    Expected behavior:

    The Engine API JWT secret should be unique per node and should not be committed as a static default.

    authrpc should bind to localhost or the internal Docker network by default, not 0.0.0.0, unless the operator explicitly opts in.

  3. mssystem1 commented on May 18, 2026

    @mssystem1
    Author

    Suggested fix:

    1. Do not ship a fixed BASE_NODE_L2_ENGINE_AUTH_RAW value in .env.mainnet or .env.sepolia
    2. Generate a random JWT secret at startup if no secret is provided
    3. Persist the generated secret under the node data directory
    4. Bind authrpc to 127.0.0.1 or an internal-only interface by default
    5. Add a startup warning if BASE_NODE_L2_ENGINE_AUTH_RAW is still set to the known default value

    Example shell logic:

    if [ -z "${BASE_NODE_L2_ENGINE_AUTH_RAW:-}" ]; then
    if [ ! -f "$BASE_NODE_L2_ENGINE_AUTH" ]; then
    openssl rand -hex 32 > "$BASE_NODE_L2_ENGINE_AUTH"
    fi
    else
    echo "$BASE_NODE_L2_ENGINE_AUTH_RAW" > "$BASE_NODE_L2_ENGINE_AUTH"
    fi

    Also consider changing:

    --authrpc.addr=0.0.0.0

    to:

    --authrpc.addr=127.0.0.1

    or document very clearly that exposing authrpc with the default JWT is unsafe.

  4. erhnysr commented on May 20, 2026

    @erhnysr

    PR #1087 is ready for review: #1087

  5. added a commit that references this issue on May 21, 2026
    92c3193
  6. added a commit that references this issue on Jun 4, 2026
    cf12f15
  7. github-actions commented on Jun 6, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  8. github-actions commented on Jun 12, 2026

    @github-actions
    Contributor

    This issue was closed because it has been inactive for 5 days since being marked as stale.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions