AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 51 Bitcoin

Merge bitcoin-core/gui#955: qt: filter addhdkey from RPC console history

Public commit record

What the developer wrote

Authored by Hennadii Stepanov

96/100 · Strong
Merge bitcoin-core/gui#955: qt: filter addhdkey from RPC console history

31467d59a5a8e6721af1dc5d6592fad31339bcb9 qt: filter addhdkey from RPC console history (Mateusz Klatt)

Pull request description:

Filters `addhdkey` arguments from RPC console history, consistent with other RPCs that handle private key material.

This prevents extended private keys from being retained in history. It also covers the mnemonic and passphrase inputs proposed in bitcoin/bitcoin#35857.

Adds a parser test verifying that the arguments are redacted.

## Motivation

`addhdkey` accepts a BIP 32 extended private key, but its arguments are currently retained in RPC console history, unlike other RPCs that handle private key material.

The same filter would also protect the mnemonic and passphrase inputs proposed in bitcoin/bitcoin#35857.

## Changes

- Add `addhdkey` to the RPC console sensitive-command filter.
- Add a parser test verifying that its arguments are redacted as `addhdkey(…)`.

## Tests

- `./build_gui/bin/test_bitcoin-qt` — all tests passed, including `RPCNestedTests::rpcNestedTests()`.

ACKs for top commit:
jpk68:
ACK 31467d59a5a8e6721af1dc5d6592fad31339bcb9
hebasto:
ACK 31467d59a5a8e6721af1dc5d6592fad31339bcb9, I have reviewed the code and it looks OK.

Tree-SHA512: e837f2ab0c3073266922fee8a72ab450830a4aa6193996ab7e72222738c8755bc3f073d155fddb827a5271821c3ac11e51053da422e6f09cac91b438d97b5f5e
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This update stops the Bitcoin Core graphical wallet from remembering the command-line arguments of a sensitive command called addhdkey. Previously, if a user typed addhdkey followed by their extended private key or recovery phrase into the built-in RPC console, that secret material would be saved in the console's command history. Other secret-handling commands were already filtered, but addhdkey was missed. The fix adds it to the same filter and includes a test that confirms the arguments are replaced with a redacted placeholder.

Recommended action

No immediate action required for users; the fix is included in this merge. Users concerned about prior exposure should clear their local Bitcoin Core Qt RPC console history and avoid entering extended private keys or mnemonic phrases into shared or untrusted environments. Developers should verify the same filter is applied to any future RPCs accepting seed or extended-key material.

Security signals we found

01

Sensitive data exposure via command history

02

Missing entry in sensitive-command allowlist/filter

03

Private key / seed phrase material retained in UI history

04

Consistency fix aligning addhdkey with existing private-key RPC filtering

Risk score

Why this scored 51/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 10/15
Affected reach 7/15
Confidence 9/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.