The webapi authentication layer trusts a client-controlled X-lobe-chat-auth header that is only XOR-obfuscated, not signed or otherwise authenticated. Because the XOR key is hardcoded in the repository, an attacker can forge arbitrary auth payloads and bypass authentication on protected webapi routes.
Affected routes include:
- POST /webapi/chat/[provider]
- GET /webapi/models/[provider]
- POST /webapi/models/[provider]/pull
- POST /webapi/create-image/comfyui
The frontend creates X-lobe-chat-auth by XOR-obfuscating JSON with the static key LobeHub ยท LobeHub, and the backend reverses that operation and treats the decoded JSON as trusted authentication data.
The backend then accepts any truthy apiKey field in that decoded payload as sufficient authentication. No real API key validation is performed in this path.
As a result, an unauthenticated attacker can forge payloads such as:
{"apiKey":"x"}
or
{"userId":"victim-user-123","apiKey":"x"}
and access webapi routes as an authenticated user.
Confirmed PoC The following forged header was generated directly from the published XOR key using payload {"apiKey":"x"}:
X-lobe-chat-auth: N00DFSE+B1ngjQI0TR8=
That header decodes server-side to:
{"apiKey":"x"}
A simple request is:
curl 'https://TARGET/webapi/models/openai' \
-H 'X-lobe-chat-auth: N00DFSE+B1ngjQI0TR8='
If the deployment has OPENAIAPIKEY configured, the request should succeed without a real login and return the provider model list.
A forged impersonation payload also works conceptually:
{"userId":"victim-user-123","apiKey":"x"}
This is an unauthenticated authentication bypass.
An attacker can:
The core issue is trusting unsigned client-supplied auth data:
Ecosystem: npm
Package name: @lobehub/lobehub Affected versions: <= 2.1.47 Patched versions: 2.1.48
Severity Moderate Vector String CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
Weaknesses CWE-287: Improper Authentication CWE-345: Insufficient Verification of Data Authenticity CWE-290: Authentication Bypass by Spoofing
{
"github_reviewed": true,
"github_reviewed_at": "2026-04-08T15:04:30Z",
"cwe_ids": [
"CWE-287",
"CWE-290",
"CWE-345"
],
"severity": "MODERATE",
"nvd_published_at": "2026-04-08T20:16:25Z"
}