Skip to content
MediumVulnerability

GHSA-5mwj-v5jw-5c97: LobeHub: Unauthenticated authentication bypass on `webapi` routes via forgeable `X-lobe-chat-auth` header

Published
Record updated
View JSON
Affected
  • @lobehub/lobehub <= 2.1.47
Fixed in
2.1.48
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.1%

Summary

GHSA-5mwj-v5jw-5c97 affects @lobehub/lobehub versions up to and including 2.1.47. The webapi authentication layer trusts the client-supplied X-lobe-chat-auth header, which is only XOR-obfuscated with a hardcoded key, and accepts any truthy apiKey in the decoded payload without validation, allowing an unauthenticated attacker to reach protected routes such as POST /webapi/chat/[provider] and GET /webapi/models/[provider] and to use the deployment's configured provider credentials and impersonate userIds. The advisory is rated Moderate (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L) and maps to CWE-287, CWE-345 and CWE-290.

Mitigation

Fixed in 2.1.48 (patched version: @lobehub/lobehub 2.1.48). The source also suggests requiring a server-validated session, OIDC token or validated API key for protected webapi routes, removing the apiKey truthiness check as an auth decision, and signing any client payload server-side with an HMAC or replacing it with a session-bound backend lookup.