Miggo Logo

CVE-2024-34694: LNbits improperly handles potential network and payment failures when using Eclair backend

8.1

CVSS Score
3.1

Basic Information

EPSS Score
0.20423%
Published
6/17/2024
Updated
6/17/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
lnbitspip< 0.12.60.12.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from three key elements in eclair.py's payment handling: 1) The use of blocking requests with a 30s timeout (line 138), 2) Immediate error assumption via raise_for_status() (line 141), and 3) Payment failure determination based solely on initial response status (lines 144, 146). Together these create an improper exceptional condition check (CWE-754) by not verifying actual payment state after timeout. The function's error handling flow makes it vulnerable to the described race condition attack.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry P*yin* invoi**s in **l*ir t**t *o not **t s*ttl** wit*in t** int*rn*l tim*out (**out **s) l*** to * p*ym*nt **in* *onsi**r** **il**, *v*n t*ou** it m*y still ** in *li**t. ### **t*ils Usin* `*lo*kin*: tru*` on t** *PI **ll will l*** to

Reasoning

T** vuln*r**ility st*ms *rom t*r** k*y *l*m*nts in **l*ir.py's p*ym*nt **n*lin*: *) T** us* o* *lo*kin* r*qu*sts wit* * **s tim*out (lin* ***), *) Imm**i*t* *rror *ssumption vi* r*is*_*or_st*tus() (lin* ***), *n* *) P*ym*nt **ilur* **t*rmin*tion **s*