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

fix: invalidate jwt token on password reset (#4248)

Public commit record

What the developer wrote

Authored by Vlad Stan

70/100 · Adequate
fix: invalidate jwt token on password reset (#4248)
✓ Specific, descriptive subject✓ Names a concrete action or component✓ 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 flaw in LNbits where changing or resetting a user's password did not invalidate existing login sessions. Before the fix, someone who stole or obtained an old access token could keep using it even after the password was changed, because the system did not track that the password had been updated. The patch introduces a 'session revision' that is bumped whenever the password changes, so old tokens and two-factor challenges are rejected.

Recommended action

Deploy this patch promptly. Review any long-lived API integrations that may rely on access tokens surviving password changes, as they will now be forced to re-authenticate. Consider extending the same revision-bump logic to other credential-changing events such as username updates or 2FA enrollment changes.

Security signals we found

01

Fixes session/token invalidation on credential change

02

Adds atomic update of password hash and 2FA revision

03

Clears outstanding 2FA challenges on password change

04

Removes conditional bypass that skipped revision checks when 2FA was disabled

05

Includes regression tests covering password change, password reset, enrolled/unenrolled 2FA, and auth cache scenarios

Risk score

Why this scored 72/100

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