create_account is reachable without the admin allowlist (allowNewKeys hardcoded true) and has no throttling #57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
src/daemon/admin/index.ts:44const allowNewKeys = true;and:267-270return early fromvalidateRequestforcreate_account, skippingvalidateRequestFromAdmin. The admin transport subscribes#p = admin pubkeyon kinds 24133/24134 from anyone, so any nostr client can drive the account-creation flow: key generation, config write, nip05 file rewrite, DB rows and an immediatekind:'all'grant to the caller. The anti-spam// TODO: require some POWis still open. Today the only brake is thatvalidateDomainthrows when nodomainsare configured.Impact: unauthenticated, unbounded resource creation and namespace pollution on any deployment with a domain configured; each created key is also a plaintext custodial secret (separate issue).
Fix direction: make open signup a config flag defaulting to off (e.g.
admin.allowOpenSignupor per-domain), and when on, require NIP-13 PoW on the request event plus a per-pubkey rate limit and a global/domain account cap. Our operator-IdP path usescreate_new_keyover the admin channel and does not needcreate_accountat all, so default-off costs nothing.Found during reforge run #1 (sandbox nsecbunkerd#8).