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

fix: wallet details (#4153)

Public commit record

What the developer wrote

Authored by Vlad Stan

55/100 · Thin
fix: wallet details (#4153)
✓ Descriptive subject✓ Uses a recognizable type or scope✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a privacy and authorization issue in LNbits where wallet secret keys (admin and invoice keys) were being returned to API clients even when the client was authenticated with a restricted access-control token that only had read permission. The change introduces a new helper that masks those keys unless the current request has write access to the endpoint, and applies it to several wallet-listing API responses. It also adds tests confirming the masking behavior.

Recommended action

Review whether any other endpoints return Wallet or User objects containing wallet keys and ensure they also apply copy_with_keys with the correct can_write flag. Verify that the new check_api_write_access decorator correctly handles all authentication paths, including extension-specific endpoints that may return wallet details.

Security signals we found

01

Sensitive credential disclosure in API responses

02

Authorization boundary between read-only and write ACL tokens

03

New access-control check tied to endpoint path and HTTP method

04

Redaction of adminkey and invoice key in serialized wallet objects

05

Regression tests for restricted token key exposure

Risk score

Why this scored 64/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 10/15
Affected reach 12/15
Confidence 8/10
Evidence quality 4/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.