/

CVE-2026-59095

Severity:

HIGH RISK

(7.7)

Server-Side Request Forgery (CWE-918) in LobeChat API

CVE-2026-59095

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Internal service probing and credential disclosure

Severity:

HIGH RISK

(7.7)

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

LobeChat contains a server-side request forgery flaw where authenticated users can steer backend HTTP requests to arbitrary URLs via import and image-fetch endpoints.

When these endpoints trust user-supplied URLs and bypass SSRF-safe wrappers, attackers can query internal services like cloud metadata endpoints, exposing sensitive responses and credentials.

Affected context

This vulnerability appears in LobeChat deployments where the skill import service (importFromUrl) and topic cover update (fetchImageFromUrl) endpoints accept user-provided URLs and forward them using a global fetch implementation.

The issue arises when these endpoints execute on the server without enforcing SSRF protections, network egress restrictions, or strict URL validation, allowing them to reach internal network locations and cloud provider metadata services.

Exploit preconditions

  • Attack surface: HTTP API endpoints handling URL-based imports and image fetching (importFromUrl, fetchImageFromUrl)
  • Required access: Authenticated access to LobeChat with permission to invoke the affected endpoints
  • Trigger point: Supplying a crafted URL parameter that is passed directly to the global fetch call on the server
  • Why exploitation is possible: The implementation bypasses the project's ssrf-safe-fetch wrapper and does not constrain destination hosts, schemes, or IP ranges, enabling arbitrary outbound requests from a privileged server network context

Why this happens

The underlying bug is a classic server-side request forgery condition (CWE-918) in which server-side HTTP client code forwards user-supplied URLs without adequate validation or network segregation.

By using a generic fetch API instead of the project's SSRF-aware wrapper, the code trusts external input to define internal request targets, allowing the application server to act as a proxy into otherwise non-public infrastructure such as metadata services or internal APIs.

Abstractly, this reflects an insecure pattern where user-controlled network destinations are allowed from privileged backends, with missing allowlists, denylist checks, or egress controls to prevent sensitive internal access.

Potential impact

  • Attackers may query cloud instance metadata endpoints and obtain access tokens or credentials.
  • Attackers could enumerate internal HTTP services and APIs reachable from the LobeChat server.
  • Attackers can disclose internal configuration data, secrets, or debug information returned by internal endpoints.
  • Attackers may pivot to further compromise by using exposed credentials for lateral movement or account takeover.

General mitigation guidance

Effective mitigation focuses on reducing trust in user-supplied URLs and constraining where server-side HTTP clients can connect.

Common defensive patterns include:

  • Routing all user-controlled outbound HTTP calls through hardened SSRF-safe wrappers that enforce strict host and scheme allowlists.
  • Applying URL normalization and validation, blocking link-local, loopback, private IP ranges, and metadata service hostnames by default.
  • Segregating backend networks so application servers have minimal reach into management planes or highly sensitive services.
  • Implementing least-privilege for any credentials accessible from the server environment and rotating them regularly.
  • Designing import and image-fetch features to use curated sources or pre-approved domains instead of arbitrary URLs.

How teams detect issues like this

SSRF issues can be detected through a mix of code-level and operational controls:

  • Static analysis rules that flag server-side HTTP calls using user-supplied URLs without validation or SSRF-safe wrappers.
  • Code review checklists emphasizing examination of any fetch, HTTP client, or URL-parsing logic exposed via API parameters.
  • Policy enforcement in CI that bans direct usage of low-level HTTP clients where a project-specific safe abstraction exists.
  • Runtime monitoring and logging of outbound requests, coupled with alerts for access to known sensitive endpoints such as cloud metadata services or internal IP ranges.

Sources

SourceLink
github.comgithub.com/lobehub/lobehub/issues/16536
github.comgithub.com/lobehub/lobehub/pull/16601
vulncheck.comvulncheck.com/advisories/lobechat-canary-18-ssrf-via-importfromurl-and-fetchimagefromurl

Frequently asked

questions

It is typically exploitable remotely by any authenticated user who can access the affected endpoints, because they can instruct the server to send requests to internal or external destinations on their behalf.

The attacker generally needs an authenticated account in LobeChat with permission to invoke the skill import or image fetch functionality, but does not require direct access to internal networks or cloud consoles.

Route all user-influenced outbound HTTP requests through an SSRF-safe abstraction that enforces strict host restrictions and validate URLs, combined with network segmentation that limits what the application server can reach.

Establish coding standards that forbid direct HTTP client usage with untrusted URLs, mandate safe wrappers, incorporate SSRF-focused checks into code review and static analysis, and regularly test endpoints with security tooling to reveal unsafe network access patterns.

Find out what's already
exploitable in your codebase.