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

fix: mempool urls (#4286)

Public commit record

What the developer wrote

Authored by Vlad Stan

55/100 · Thin
fix: mempool urls (#4286)
✓ 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 security gap in LNbits' on-chain (Bitcoin) wallet feature. Previously, a wallet owner could point their wallet at any Mempool-style block explorer URL, including internal or attacker-controlled addresses. The server would then make HTTP requests to that URL, which could leak data, reach internal services, or be tricked by redirects. The patch introduces an administrator-controlled 'approved explorer URL' list, validates URLs strictly, blocks unapproved endpoints before any network request, and disables HTTP redirects. It also lets users see and pick only approved URLs in the wallet settings screen.

Recommended action

Treat this as a security fix and include it in the next release. Operators should review lnbits_onchain_explorer_urls in admin settings, ensure only trusted Mempool endpoints are listed, and advise users with unapproved saved endpoints to select an approved one. No CVE is referenced in the commit; consider requesting one if the project tracks SSRF fixes.

Security signals we found

01

Server-Side Request Forgery (SSRF) mitigation: unapproved mempool endpoints are rejected before httpx.AsyncClient is instantiated

02

Open redirect / redirect-to-attacker mitigation: follow_redirects=False on mempool requests

03

Input validation: Pydantic validator strips paths, rejects credentials, fragments, query strings, control chars, backslashes, and invalid ports

04

Authorization boundary: only server admins can modify approved explorer URLs; wallet owners cannot bypass via UI or API

05

Defense in depth: endpoint re-validated on every request, so revoking approval blocks ongoing scans

06

Error-message hygiene: unapproved endpoint errors are surfaced to user; other failures are generic to avoid leaking URLs/credentials

Risk score

Why this scored 79/100

Our methodology →
Potential impact 22/30
Exploitability 18/25
Stealth signal 12/15
Affected reach 13/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.