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

fix: do not hit sso provider on user missmatch (#3995)

Public commit record

What the developer wrote

Authored by Vlad Stan

70/100 · Adequate
fix: do not hit sso provider on user missmatch (#3995)
✓ 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 patch fixes a security gap in LNbits' single-sign-on (SSO) login flow. Previously, an attacker could start an SSO login for someone else's user ID, potentially tricking the system into linking an external identity to an account they do not own. The fix now checks that the requested user ID matches the currently authenticated user before redirecting to the SSO provider. The commit message and tests confirm the issue was a 'user mismatch' that caused an unwanted SSO-provider hit.

Recommended action

Deploy this patch promptly. Review related SSO callback handling to ensure the same user_id/auth_user_id validation is enforced when the provider returns the token, and audit logs for any prior mismatched SSO attempts.

Security signals we found

01

Missing authorization check on SSO initiation endpoint

02

User-controlled user_id parameter tied to account linking

03

Fix prevents redirect to external SSO provider when user IDs do not match

04

Test cases explicitly assert 403 on mismatch scenarios

Risk score

Why this scored 59/100

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