CVE-2026-39411: LobeHub Authentication Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-5mwj-v5jw-5c97
CVSS 5.0
CWE-287 CWE-345 CWE-290
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-39411
GHSA Identifier GHSA-5mwj-v5jw-5c97
Severity MODERATE
CVSS v3.1 Base Score 5.0
CWE Classification CWE-287: Improper Authentication
Affected Product LobeHub
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (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.

@lobehub/lobehub fixed: 2.1.48
npm install @lobehub/lobehub@2.1.48
Verify Direct and Transitive Dependencies

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

# Summary 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` ## Details 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: ```json {"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 OPENAI_API_KEY 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"} ``` ### Impact This is an unauthenticated authentication bypass. An attacker can: 1. access protected webapi routes without a valid session 2. spend the deployment's server-side model provider credentials when env keys like OPENAI_API_KEY are configured 3. impersonate another user's userId for routes that load per-user provider configuration 4. invoke privileged backend model operations such as chat, model listing, model pulls, and ComfyUI image generation ### Root Cause The core issue is trusting unsigned client-supplied auth data: 1. the auth header is only obfuscated, not authenticated 2. the obfuscation key is hardcoded and recoverable from the repository 3. the decoded apiKey field is treated as sufficient authentication even though it is never validated in this code path 4. Suggested Remediation 5. Stop treating X-lobe-chat-auth as an authentication token. 6. Remove the apiKey truthiness check as an auth decision. 7. Require a real server-validated session, OIDC token, or validated API key for all protected webapi routes. 8. If a client payload is still needed, sign it server-side with an HMAC or replace it with a normal session-bound backend lookup. 9. Affected Products 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

CVE-2026-39411 Affected LobeHub Versions

1 component(s)
Fixed Versions:
2.1.48
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?
CVE-2026-39411 is a security vulnerability in LobeHub involving Unauthenticated authentication bypass on `webapi` routes via forgeable `X-lobe-chat-auth` header under CWE-287: Improper Authentication.
Which LobeHub versions are affected?
Affected versions include releases prior to 2.1.48 across affected packages: @lobehub/lobehub.
What version fixes CVE-2026-39411?
Upgrading to 2.1.48 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @lobehub/lobehub affected?
Yes, @lobehub/lobehub is affected in releases prior to 2.1.48. Upgrade your dependency to 2.1.48 or later.
What is the CVSS score of CVE-2026-39411?
CVE-2026-39411 has a CVSS v3.1 base score of 5.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2026-39411?
CVE-2026-39411 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for CVE-2026-39411?
Run the dependency tree command: 'npm ls @lobehub/lobehub'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}