The vulnerability lies in the handling of the Nostr private key within the OpenClaw configuration. The key was stored as a plaintext string (privateKey: z.string().optional()) and was not properly redacted when the configuration was accessed or displayed. The analysis of the patch commit 57700d716f660591fb6e09727f3ca8041fa48b9d reveals that several functions were directly accessing this sensitive value.
The root cause was the inadequate configuration schema and the lack of a redaction mechanism for this specific secret. The fix involved two main parts:
- Changing the configuration schema for
channels.nostr.privateKey from a simple string to a SecretInput type. This is evident in extensions/nostr/src/config-schema.ts.
- Adding a generic pattern
/private.?key/i to the list of sensitive patterns in src/config/schema.hints.ts, which is used by the configuration snapshot redaction logic to automatically hide sensitive fields.
The identified vulnerable functions, resolveNostrAccount and nostrSetupWizard.credentials.inspect, are points in the code where the unredacted private key was directly accessed. resolveNostrAccount used the key to derive a public key, and in the process, made the raw key available within the resolved account object. The inspect function explicitly returned the key's value for UI purposes. An attacker with access to configuration views or logs containing the output of these functions could have retrieved the plaintext Nostr private key.