Repository navigation
Restrict web3signer host allowlist to known DAppNode callers - #71
Merged
Marketen merged 4 commits intoOct 27, 2026
Merged
Conversation
Replace --http-host-allowlist=* with the hostnames DAppNode packages and the DAppManager actually use to reach web3signer, so the unauthenticated keymanager API stays protected against DNS rebinding from browsers on the DAppNode VPN/Wi-Fi. Users can append hosts (or "*") through the new EXTRA_HOST_ALLOWLIST env var. The list is a superset of the one gnosis/lukso/hoodi already run with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checked against a live DAppNode (DAppManager 0.2.129): besides the stakers-module aliases the container also gets the bare service name, <domain>.private, web3signer.<domain>.private and its container name. No known caller uses them, but they are internal names, so allowing them costs nothing and avoids 403s for tooling that does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The web3signer flags are passed word-split, so "a.example, b.example"
made web3signer fail to start ("Unmatched argument at index 4:
'b.example'"). A typo in the package config must not stop the signer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Marketen
added a commit
that referenced
this pull request
Oct 27, 2026
Restrict web3signer host allowlist (bring #71 into main)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #70. That PR temporarily set
--http-host-allowlist=*to match the legacy mainnet package. This PR replaces*with an explicit list.Why
Web3signer checks the
Hostheader of every request on :9000, including the keymanager API, which has no auth. The match is exact and case-insensitive, with the port stripped; the only wildcard is a bare*. That check is the only thing stopping a DNS-rebinding page, open in a browser on the DAppNode VPN or Wi‑Fi, from listing, importing or deleting keys. CORS doesn't help: after rebinding the page counts as same-origin.The legacy mainnet package switched to
*in 2.0.12 as a hotfix. Brain ≥0.1.20 callssigner.mainnet.dncore.dappnode, and the legacy 2.0.11 list didn't include it, so requests got 403.Change
services/web3signer/entrypoint.shbuilds the list from${NETWORK}and${WEB3SIGNER_DOMAIN}:localhost,127.0.0.1web3signer[-<net>].dappnodeweb3signer.web3signer[-<net>].dappnodeget_signer_api_url(e.g. prysm--validators-external-signer-url), Rocket Pool API, lido-csm, keys registered by brain ≤0.1.19, healthcheckbrain.web3signer[-<net>].dappnodesigner.<net>.dncore.dappnodeweb3signer.<net>.dncore.dappnodesigner/web3signer.<net>.staker.dappnode,.<net>.dappnode.privatevalidator.<consensus client>.dappnodeweb3signer,<domain>.private,web3signer.<domain>.private, container name${EXTRA_HOST_ALLOWLIST}*restores the old behaviour.How the list was built
web3signer.web3signer-gnosis.dappnode.--validators-external-signer-url/--externalSigner.urlfrom staker-scriptsget_signer_api_url, i.e.http://web3signer.${web3signer_domain}:9000=web3signer.web3signer[-<net>].dappnode.signer.<net>.dncore.dappnode).signer.${network}.dncore.dappnode:9000.signer.<net>.dncore.dappnode, andweb3signer.web3signer[-hoodi].dappnodein the widget.web3signer.web3signer${w3sSuffix}.dappnode:9000.web3signer.%s.dncore.dappnode.web3signer.web3signer[-<net>].dappnode.op-node: image unavailable from both gateways. It's an L2 node, and its compose/manifest don't mention the signer.Testing
Same harness as #70: the real on-chain 2.0.17 images upgraded to this build, in a DAppNode-like compose with the DAppManager aliases. All checks pass, including:
Hostvalues (including uppercase and:9000) → 200;evil.example.com, a raw container IP, and other-network names → 403;signer.mainnet.dncore.dappnode,web3signer.web3signer.dappnodeandweb3signer.mainnet.dncore.dappnodeand reaching/upcheck;signer.mainnet.dncore.dappnode) → 200;EXTRA_HOST_ALLOWLIST="my-remote-vc.example,10.0.0.5"→ both allowed,evil.example.comstill 403.Release note to include
Mainnet previously accepted any
Host. If you reach web3signer by a custom name or IP (for example a remote validator client), add it toEXTRA_HOST_ALLOWLISTin the package config. Without that, web3signer answers403 Host not authorized.Added since opening
c025e96):web3signer.hoodi.dncore.dappnode, the validator-tracker's URL.EXTRA_HOST_ALLOWLIST(16a356a):a.example, b.examplemade web3signer fail to start (Unmatched argument at index 4: 'b.example').brain.<domain>:3000), never web3signer directly.Validation of every release order (#70, #71, #72)
I tested every state
maincan end up in:Local matrix (arm64), for mainnet, gnosis, lukso and hoodi:
Real DAppNode (amd64, DAppManager 0.2.129, Docker 29.9, Compose v5.6), installed through the DAppManager installer:
Release risk outside these PRs: DAppNode's IPFS gateways sometimes cut the trustless
?format=cardownload of large images partway (terminated). On the test node, 3 registry installs failed this way. I reproduced it once from another machine, and later attempts succeeded. It fails safe (nothing is installed), but expect some "download failed" reports right after publishing; the infra team should look at it.🤖 Generated with Claude Code