> For clean Markdown of this page, append .md to its URL. For the complete documentation index, see https://www.superagent.sh/llms.txt.


Assess whether LibreChat registration metadata can bind a future social-login user to an attacker-accessible account.

# LibreChat pre-registration account takeover


[← Back to attack scenarios](https://www.superagent.sh/docs/products/red-teaming/attack-scenarios)

Local registration must keep identity-provider metadata under server control. CVE-2026-54039 (GHSA-wjpf-x42h-cv4m) combines an attacker-supplied `provider` field at `POST /api/auth/register` with social-login email fallback. A future user's social login can resolve to the planted account while the attacker retains password access to the same record. The maintainer published the advisory on November 17, 2026, and identifies LibreChat versions **0.7.0 through versions before 0.8.6** as affected. **0.8.6** contains the fix; verify the running build and any backport rather than relying on an image tag.

This repository scenario traces registration validation and persistence in `api/server/services/AuthService.js`, provider-subject lookup and email fallback in `api/strategies/socialLogin.js`, and subsequent password access. It applies when local registration and a social provider are enabled. Invite and domain restrictions, email verification, and local-password login policy can change whether the full chain works. Selecting the scenario does not enable those features or bypass their policies.

Dynamic verification requires a disposable local application with its real persistence and authentication paths, controlled social-provider transport, and synthetic identities. A local simulator may replace only external provider responses; registration, the affected social-login callback, persistence, password login, and resource authorization must run their real application code. Reports label this reproduction as fixture-only. A different OpenID or SAML implementation is not a substitute for the affected shared social-login path. After the fixture owner legitimately signs in as the test victim and saves a private marker, the attacker must retrieve that marker through a separate password-authenticated session and the application's protected route. Ordinary local and social login provide working baselines; an unrelated user must be denied access. Compare registration with the provider omitted against the forged-provider case. Missing services, identities, session separation, or safe observation leave the relevant checks blocked. Unresolved or negative results remain inconclusive under the existing verification requirements.

A finding can identify the exact source path, configuration, account binding, and demonstrated unauthorized data access. A version match or accepted registration request alone does not prove takeover. Reports distinguish source exposure, local fixture reproduction, and confirmed target impact; they do not infer access to existing accounts, administrator privileges, or historical victim data. Public deployments, public identity providers, and real users are outside this reproduction.

Remediation uses LibreChat 0.8.6 or a verified backport that persists validated registration fields and reserves provider overrides for trusted server data. Repeat the original chain against a healthy corrected application and verify ordinary logins still work. The maintainer treats the separate unverified-provider-email trust report as a distinct issue.

The app lists this scenario as **LibreChat — pre-registration account takeover** (`REPO-20`) in [Repository Red Teaming](https://www.superagent.sh/docs/products/red-teaming/repositories).

## Standards and guidance

[LibreChat maintainer advisory GHSA-wjpf-x42h-cv4m](https://github.com/LibreChat-AI/LibreChat/security/advisories/GHSA-wjpf-x42h-cv4m)

[LibreChat registration fix](https://github.com/LibreChat-AI/LibreChat/commit/b01d34abe29152e6e7f763089c0d9a6e647d0dba)

[LibreChat v0.8.6 release](https://github.com/LibreChat-AI/LibreChat/releases/tag/v0.8.6)

[OWASP Authentication Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html)

---
Source: https://www.superagent.sh/docs/products/red-teaming/attack-scenarios/librechat-pre-registration-takeover
Index: https://www.superagent.sh/llms.txt
