RFC: Stop advertising exact client version in user agent #36951

issue ismaelsadeeq opened this issue on November 23, 2026
  1. ismaelsadeeq commented at 1:04 PM on November 23, 2026: member

    BIP 14 introduced the user agent ("vanity-plate") for client identification, not as a protocol or security requirement. In a recent Peers Census, it was trivial to list vulnerable nodes straight from MAJOR.MINOR.BUILD.

    This came up before in #21492 (closed with no change). Even though changing it won't stop brute-forcing, recent vulnerability disclosures make it worth discussing this again:

    • Point-release targeting: An attacker targeting a bug fixed in e.g. 31.1.0 can filter for 30.0.0 and skip patched nodes and monitoring nodes that aren't running the vulnerable version. If both look the same, exploit attempts hit patched nodes too and show up in logs, raising the attack scope to network-wide cost in the worst case.
    • Targeted attacks: If a target node is deanonymized, its user agent reveals which bugs may work against it. Keeping the attacker blind to the target's patch level can also buy defenders time: blind exploit attempts can trigger anomaly detection, letting the node spot and ban the peer before the operator upgrades instantly.

    It's worth investigating whether the trade-off this and what user agent provides still makes sense. Two options come to mind:

    1. Major version only: Hide point-release patches on the wire (keeping the full version locally). This still exposes EOL nodes, but helps nodes that haven't upgraded quickly to a point release. e.g just /Satoshi:33.0.0/ no minor.
    2. Empty string (""): user_agent is a required field in version, so send empty. Future releases look the same (though handshake features still hint at rough versions).

    The main question is whether hiding patch status is worth losing point-release stats (1) or all version stats (2). Also, do we actually use BIP 14 data as a signal when deciding to disclose critical vulnerabilities? It isn't clear from https://bitcoincore.org/en/security-advisories/. Thoughts?

  2. maflcko added the label Brainstorming on Nov 23, 2026
  3. maflcko added the label P2P on Nov 23, 2026
  4. stickies-v commented at 2:19 PM on November 24, 2026: contributor

    I'm in favour of dropping (i.e. empty string) the user agent completely. It's a fingerprinting vector (incl. possible implications for more targeted attacks, although I think this is limited - an attacker can still fingerprint based on observed behaviour in many cases), and I am not aware of any actionable takeaways we should draw from this dataset. While it's fun to see (presumed) upgrade velocity, I don't think this actually influences Bitcoin Core's release policy. It seems a poor fit for influencing vulnerability disclosure too. We have no way of measuring how many of those nodes are abandoned, unused, or economically irrelevant. Furthermore, I think in the current security environment, we can no longer afford to wait for - or optimize our disclose practices around - laggards.

    The main areas where having data is useful are for consensus upgrades and for network policy changes. For the former, we have miner signalling data. For the latter, we should measure observed behaviour (e.g. messages, feature flags, ...) instead.

  5. ismaelsadeeq commented at 12:44 PM on November 25, 2026: member

    We have no way of measuring how many of those nodes are abandoned, unused, or economically irrelevant.

    There are already observed instances where we see false user agents https://bnoc.xyz/t/satoshi-31-0-0-peers-with-no-service-flags-and-protocol-70015-pushed-transactions-then-stopped-together-on-oct-18/193, so it is indeed not reliable.

  6. maflcko commented at 1:01 PM on November 25, 2026: member

    I was thinking it could be useful when debugging broken P2P behavior, so that it is easier to find/fix the codebase. Though, given that broken P2P behavior has a good chance that it it malicious (and thus fakes the user agent), it may be fine to use an empty string.

  7. mzumsande commented at 5:51 PM on November 26, 2026: contributor

    I think this is limited - an attacker can still fingerprint based on observed behaviour in many cases

    I agree, but I wanted to see how easy it is, so I put my LLM to work: Here is a list of the most important fingerprints per version that are not invasive and quick to check (there are more, plust I didn't verify everything yet):

    0.19 -> 0.20: getdata for unknown MSG_WTX hash: stalls -> silently dropped (weak, some older versions also drop) 0.20 -> 0.21: protocol version 70015 -> 70016 (wtxid relay) 0.21 -> 22: sendcmpct sent before verack: ignored -> honoured 22 -> 23: unsolicited addr before we send any address message: sent -> not sent 23 -> 24: sendcmpct messages in handshake: two -> one 24 -> 25: 65-byte tx accepted as orphan: no -> yes 25 -> 26: getheaders locator version when we advertise 70015: 70015 -> 70016 26 -> 27: none found 27 -> 28: nine unconnecting headers messages: eight answered with getheaders -> all nine answered 28 -> 29: orphan with dust output: rejected -> accepted 29 -> 30: send orphan with two OP_RETURN outputs: rejected -> accepted 30 -> 31: self-announcement after getaddr: inside the response -> separate one-entry addr message 31 -> 32: protocol version 70016 -> 70017 (feature message)

    I then let my LLM build a tool based on these signals and others, and connected to all reachable nodes and compared the detected with the advertised version - still analyzing the data, but it seems that most Core nodes don't appear to lie about their major version, and if they do they run custom software instead of a different version.

    So I think removing the user agent from major versions would not help all that much against an attacker - they can easily build a similar tool if they want to, I on purpose didn't put any of my own knowledge of the p2p code into any of this. Removing minor versions on the other hand is something that I think could make sense.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-11-30 04:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me