CVE-2026-54039: LibreChat let an unauthenticated attacker pre-register a victim's email with a forged social provider and share the account once the victim signed in with Google or another provider (fixed 0.8.6)
From 0.7.0 until 0.8.6, when local registration is enabled and at least one social login provider is configured, LibreChat's POST /api/auth/register wrote the provider field from the request body onto the new user record. The social-login email fallback later accepted that record when the victim signed in, because it compared only the stored provider name and not the provider's subject id. An unauthenticated attacker who knows a victim's email could pre-register it with provider set to, for example, google and a password of their choice; after the victim's first OAuth sign-in both sessions are bound to the same user, giving the attacker lasting read and write access to the victim's conversations and data. Fixed in 0.8.6.
What it is
Root cause: api/server/services/AuthService.js received the unparsed request object on local registration, and api/strategies/socialLogin.js matched an existing account by email plus provider name without checking googleId, facebookId or the equivalent subject identifier.
Preconditions: local registration enabled, at least one social provider configured, and the attacker knows (or guesses) the victim's email before the victim's first social sign-in.
On a fresh deployment, the first registered user becomes administrator, which the advisory notes as an additional conditional impact.
Affected: LibreChat 0.7.0 up to (not including) 0.8.6. v0.8.6 was released on 1 June 2026; GitHub published the advisory on 17 November 2026 and NVD the CVE on 20 November 2026.
How to check
- Check your LibreChat version.
- Check whether ALLOW_REGISTRATION and any social login (Google, GitHub, Discord, Facebook, OpenID…) are both enabled.
- Look for users whose record has a social provider but who also have a local password, or accounts created shortly before the owner's first social sign-in.
How to fix
- Upgrade LibreChat to 0.8.6 or later.
- If you can't upgrade yet, disable local registration (ALLOW_REGISTRATION=false) while social login is on.
- Review suspicious accounts and reset passwords and sessions for any that look pre-registered.
# is local registration on alongside social login?
grep -E '^(ALLOW_REGISTRATION|ALLOW_SOCIAL_LOGIN|ALLOW_SOCIAL_REGISTRATION)=' .env