[SECURITY] Existing Beacon agents can be renamed/reactivated through unsigned /beacon/join

Open
#8,514 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 10 days

@naief9961-tech is already working on this.

Since Sep 24, 2026.

  • #8515 by @naief9961-tech — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
flask, python

Research direction

Start with node/beacon_api.py, especially the existing-agent branch in beacon_join, and inspect the Beacon request-signature verification and related tests. A pull request (#8515) is already open, so coordinate before starting. Done means regressions verify unsigned existing-agent updates are rejected, correctly signed updates succeed, and protected statuses remain protected.

Written by the indexing model from the issue text.

Description

Summary

POST /beacon/join authenticates neither the caller nor an existing agent before applying mutable updates. For an existing canonical Beacon agent, a caller only needs the public agent_id and the already-public pubkey_hex to change the stored display name and to move an ordinary inactive agent back to active.

This is distinct from #4589 / PR #4805: that fix correctly made coinbase_address immutable, but intentionally left display-name updates enabled. The remaining update path still has no proof-of-possession check.

Impact

A third party can:

  • overwrite the public display name of a registered agent;
  • reactivate an agent whose current status is inactive;
  • make the Atlas/directory show identity metadata chosen by someone who does not possess the agent's private key.

The route correctly preserves administrator-barred statuses such as banned/suspended/revoked, so this is not a ban bypass and I am not claiming fund theft. It is an authorization/profile-integrity bug.

Safe local reproduction

I reproduced this only with a temporary SQLite database and Flask test_client; no production agent was modified.

  1. Generate an Ed25519 keypair and derive its canonical bcn_<12hex> agent ID.
  2. Insert a local relay_agents row:
    • name = Original Name
    • status = inactive
    • pubkey = generated public key
  3. Send an unsigned POST to /beacon/join containing the same public agent_id + pubkey_hex, but name = ATTACKER RENAMED.
  4. No X-Agent-Id, X-Agent-Timestamp, X-Agent-Nonce, or X-Agent-Signature headers are sent.

Observed on current main:

STATUS 200
BODY {
  "agent_id": "bcn_dbd943d66198",
  "name": "ATTACKER RENAMED",
  "ok": true,
  "status": "active",
  ...
}
ROW_NAME ATTACKER RENAMED
ROW_STATUS active
PUBKEY_UNCHANGED True
NO_SIGNATURE_HEADERS_SENT True

Root cause

In node/beacon_api.py::beacon_join, the existing-agent branch checks that pubkey_hex and coinbase_address were not changed, but possession of the stored private key is never verified before:

  • updating name; and
  • setting any non-protected status to active.

Matching a public key value is identity lookup, not authentication.

Suggested fix

For an existing agent, require a Beacon Ed25519 request signature using the already-stored public key before applying any mutable update or reactivation. First-time registration can keep its current canonical agent_id = hash(pubkey) binding flow.

Add regressions asserting:

  • unsigned existing-agent rename -> 401;
  • unsigned inactive -> active rejoin -> 401;
  • correctly signed same-key rename/rejoin -> 200;
  • protected statuses remain protected.

Disclosure

  • Reproduced locally only.
  • No production exploitation performed.
  • AI-assisted analysis; reproduction was executed against a local temporary database.

Bounty reference: Scottcjn/rustchain-bounties#71
Requested severity: Medium (authorization/profile-integrity; no fund theft demonstrated).

Dominant language
Python
Stars
850
Forks
589
Avg merge
11d 7h
Merged PRs (30d)
29

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Scottcjn/Rustchain

All issues in Scottcjn/Rustchain

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.