/

CVE-2026-54157

Severity:

CRITICAL RISK

(9.0)

SSRF (CWE-918) in LobeHub /webapi/proxy Endpoint

CVE-2026-54157

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Arbitrary outbound requests and cookie injection from server-side context

Severity:

CRITICAL RISK

(9.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A server-side request forgery (SSRF) vulnerability in LobeHub's /webapi/proxy endpoint allows unauthenticated users to cause the backend to fetch arbitrary URLs.

When exploited, this can expose internal Vercel deployment details and enable reflected cookie injection on the lobehub.com domain, especially in environments where outbound access is not tightly constrained.

Affected context

The issue occurs in LobeHub's public-facing API where the /webapi/proxy endpoint accepts a URL in the POST body and performs a server-side fetch.

It is relevant in deployments where this endpoint is reachable without authentication and the backend has network access to external services or internal deployment metadata.

Risk increases when responses from these proxied requests are reflected to clients with minimal sanitization, allowing headers like Set-Cookie to be propagated.

Exploit preconditions

  • Attack surface: Public /webapi/proxy HTTP endpoint on app.lobehub.com.
  • Required access: No authentication is required; any internet user who can send POST requests to the endpoint can attempt exploitation.
  • Trigger point: Supplying a crafted URL in the POST body that the server-side proxy fetches and reflects back to the client.
  • Why exploitation is possible: The proxy functionality trusts user-supplied URLs, performs outbound requests from LobeHub's infrastructure, and exposes response metadata (including headers) without adequate validation, filtering, or origin restrictions.

Why this happens

The vulnerability stems from implementing a generic server-side proxy that directly uses user-controlled URLs as the target of outbound requests.

This pattern fits CWE-918: Server-Side Request Forgery (SSRF), where a server exposes internal or privileged network capabilities by forwarding attacker-specified requests.

In this case, the proxy lacks authentication and strict allowlists, and it reflects downstream response data (including Set-Cookie headers) back to the client, combining network-layer SSRF with application-layer header injection risks.

Potential impact

  • An attacker may cause LobeHub's backend to make arbitrary outbound HTTP(S) requests to external or internal endpoints.
  • An attacker could leak information about Vercel deployment infrastructure and response details that are normally not exposed.
  • An attacker can inject cookies on the lobehub.com domain through reflected Set-Cookie headers, potentially influencing session or application behavior.
  • The SSRF behavior could be chained with other weaknesses (e.g., misconfigured metadata services or internal admin endpoints) to escalate impact.

General mitigation guidance

Effective mitigation focuses on restricting how server-side proxy features consume and act on user input.

Common defensive patterns include:

  • Enforcing strict allowlists or well-defined destination sets for outbound requests instead of accepting arbitrary user-supplied URLs.
  • Introducing authentication and authorization checks for any endpoint that can trigger server-origin network calls.
  • Normalizing and validating URLs, rejecting private, link-local, or internal address ranges, and blocking protocols other than HTTPS/HTTP where appropriate.
  • Sanitizing or stripping sensitive response headers (e.g., Set-Cookie, Authorization, Set-Cookie2) before reflecting responses to clients.
  • Running backend services with least-privilege network and configuration access, and segmenting internal resources so a compromised proxy cannot easily reach sensitive services.

How teams detect issues like this

Detection typically involves a combination of design-time review and runtime monitoring:

  • Static analysis or code review to identify endpoints that forward user-controlled URLs to outbound HTTP clients, especially in proxy or fetch utilities.
  • Security architecture review to flag unauthenticated proxy endpoints and services that do not enforce destination allowlists or network egress policies.
  • Logging and monitoring of outbound requests initiated by API endpoints, including anomaly detection for unusual destinations, protocols, or header patterns.
  • Automated security testing (e.g., dynamic scanners, fuzzers) that probe for SSRF by supplying URLs to internal address ranges, cloud metadata endpoints, or sensitive service hostnames.

Sources

SourceLink
github.comgithub.com/lobehub/lobehub/security/advisories/GHSA-xmwj-c75x-6346

Frequently asked

questions

Not strictly. While SSRF is often used to reach internal services, in this case it also enables arbitrary outbound requests to external endpoints and can leak deployment-related information, depending on what the backend is allowed to contact.

The vulnerability is exposed on a public endpoint without authentication. Any party that can send HTTP POST requests to /webapi/proxy can attempt to exploit it, subject to standard network and application-level rate limits.

The robust fix pattern is to avoid generic, user-driven server-side proxies. If proxying is required, enforce strict allowlists, authenticate callers, validate URLs, and ensure sensitive headers and response data are not blindly forwarded to clients.

Architect API endpoints so that clients do not directly control server-origin network targets; use well-defined internal services and registries instead of raw URLs, implement egress controls and network segmentation, and include SSRF-specific checks in code review, threat modeling, and automated security testing.

Find out what's already
exploitable in your codebase.