CVE-2026-39411: LobeHub Authentication Bypass Vulnerability
MODERATECVE-2026-39411 is a MODERATE (CVSS 5.0) authentication bypass vulnerability (CWE-287: Improper Authentication) affecting LobeHub libraries in the npm ecosystem. The issue involves unauthenticated authentication bypass on `webapi` routes via forgeable `x-lobe-chat-auth` header. Remediation is available by upgrading affected packages to version 2.1.48.
CVE-2026-39411 at a Glance
Security Impact
CVSS: 5.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2026-39411
To remediate this vulnerability, upgrade all affected LobeHub dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @lobehub/lobehub@2.1.48
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @lobehub/lobehub
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-39411, inspect your project dependencies using npm:
npm ls @lobehub/lobehub
Analyze the terminal output to locate any version of LobeHub in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.48), your application is affected.
Note: The npm ls @lobehub/lobehub command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In LobeHub, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-39411 Affected LobeHub Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@lobehub/lobehub
|
npm |
< 2.1.48
|
2.1.48
|
References
Frequently Asked Questions
What is CVE-2026-39411?
Which LobeHub versions are affected?
What version fixes CVE-2026-39411?
Is @lobehub/lobehub affected?
What is the CVSS score of CVE-2026-39411?
What CWE is associated with CVE-2026-39411?
How can I check npm dependencies for CVE-2026-39411?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5mwj-v5jw-5c97",
"modified" : "2026-04-09T14:28:56Z",
"published" : "2026-04-08T15:04:30Z",
"aliases" : [ "CVE-2026-39411" ],
"summary" : "LobeHub: Unauthenticated authentication bypass on `webapi` routes via forgeable `X-lobe-chat-auth` header",
"details" : "# Summary\n\nThe `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.\n\nAffected routes include:\n- `POST /webapi/chat/[provider]`\n- `GET /webapi/models/[provider]`\n- `POST /webapi/models/[provider]/pull`\n- `POST /webapi/create-image/comfyui`\n\n## Details\n\nThe 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.\n\nThe backend then accepts any truthy `apiKey` field in that decoded payload as sufficient authentication. No real API key validation is performed in this path.\n\nAs a result, an unauthenticated attacker can forge payloads such as:\n\n```json\n{\"apiKey\":\"x\"} \n```\n\nor \n\n``` {\"userId\":\"victim-user-123\",\"apiKey\":\"x\"} ```\n\nand access webapi routes as an authenticated user.\n\nConfirmed PoC\nThe following forged header was generated directly from the published XOR key using payload {\"apiKey\":\"x\"}:\n\n\n``` X-lobe-chat-auth: N00DFSE+B1ngjQI0TR8= ```\n\nThat header decodes server-side to:\n\n``` {\"apiKey\":\"x\"}```\n\nA simple request is:\n\n``` curl 'https://TARGET/webapi/models/openai' \\\n -H 'X-lobe-chat-auth: N00DFSE+B1ngjQI0TR8=' ``` \n\nIf the deployment has OPENAI_API_KEY configured, the request should succeed without a real login and return the provider model list.\n\nA forged impersonation payload also works conceptually:\n\n``` {\"userId\":\"victim-user-123\",\"apiKey\":\"x\"} ``` \n\n### Impact\nThis is an unauthenticated authentication bypass.\n\nAn attacker can:\n\n1. access protected webapi routes without a valid session\n2. spend the deployment's server-side model provider credentials when env keys like OPENAI_API_KEY are configured\n3. impersonate another user's userId for routes that load per-user provider configuration\n4. invoke privileged backend model operations such as chat, model listing, model pulls, and ComfyUI image generation\n\n### Root Cause\nThe core issue is trusting unsigned client-supplied auth data:\n\n1. the auth header is only obfuscated, not authenticated\n2. the obfuscation key is hardcoded and recoverable from the repository\n3. the decoded apiKey field is treated as sufficient authentication even though it is never validated in this code path\n4. Suggested Remediation\n5. Stop treating X-lobe-chat-auth as an authentication token.\n6. Remove the apiKey truthiness check as an auth decision.\n7. Require a real server-validated session, OIDC token, or validated API key for all protected webapi routes.\n8. If a client payload is still needed, sign it server-side with an HMAC or replace it with a normal session-bound backend lookup.\n9. Affected Products\n\nEcosystem: npm\n\nPackage name: @lobehub/lobehub\nAffected versions: <= 2.1.47\nPatched versions: 2.1.48\n\nSeverity\nModerate\nVector String\nCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L\n\nWeaknesses\nCWE-287: Improper Authentication\nCWE-345: Insufficient Verification of Data Authenticity\nCWE-290: Authentication Bypass by Spoofing",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@lobehub/lobehub"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.48"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.1.47"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/lobehub/lobehub/security/advisories/GHSA-5mwj-v5jw-5c97"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-39411"
}, {
"type" : "WEB",
"url" : "https://github.com/lobehub/lobehub/pull/13535"
}, {
"type" : "WEB",
"url" : "https://github.com/lobehub/lobehub/commit/3327b293d66c013f076cbc16cdbd05a61a3d0428"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lobehub/lobehub"
}, {
"type" : "WEB",
"url" : "https://github.com/lobehub/lobehub/releases/tag/v2.1.48"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287", "CWE-290", "CWE-345" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-08T15:04:30Z",
"nvd_published_at" : "2026-04-08T20:16:25Z"
}
}