/

CVE-2026-58141

Severity:

HIGH RISK

(7.6)

SSRF (CWE-918) in Dify Console and Workflow Requests

CVE-2026-58141

Awaiting Analysis

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized access to internal services and potential exposure or modification of sensitive data

Severity:

HIGH RISK

(7.6)

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

Dify contains a server-side request forgery (SSRF) flaw that can let an authenticated console user send requests to internal services or cloud metadata endpoints. The risk arises when Dify processes a user-supplied URL without independently validating its destination and the proxy configuration does not block requests to restricted destinations.

Affected context

The issue affects Dify deployments where URL-fetching features or workflow nodes can make outbound requests. Relevant paths include remote-file retrieval and upload, website crawling, document import from a URL, and the HTTP Request workflow node. The risk depends on how these features are exposed and on the network access available to the Dify runtime; AWS deployments may also be at risk of requests to instance metadata endpoints.

Exploit preconditions

  • Attack surface: URL-fetching console endpoints, website crawl or document import features, and the HTTP Request workflow node
  • Required access: An authenticated console account with access to a relevant feature or workflow
  • Trigger point: Dify processes a user-provided URL or executes a workflow request
  • Why exploitation is possible: The Squid configuration defines source ACLs without destination deny rules, while the make_request() helper does not independently validate destination IP addresses

Why this happens

The application makes server-side HTTP requests based on user-controlled URLs without reliably restricting the destination. Source-only proxy ACLs do not prevent requests to internal or otherwise sensitive destinations, and the request helper lacks its own destination validation. This matches CWE-918: Server-Side Request Forgery (SSRF), in which an application can be induced to send requests to unintended systems.

Potential impact

  • Requests could reach internal services such as the sandbox or internal APIs
  • Attackers may be able to access data exposed by reachable internal components, subject to those components' controls
  • On some AWS deployments, requests to instance metadata endpoints could expose IAM credentials
  • HTTP Request workflows could send POST, PUT, or DELETE requests that may modify internal services

General mitigation guidance

Mitigation generally focuses on controlling outbound destinations at multiple layers rather than relying on a proxy's source ACLs alone.

Common defensive patterns include:

  • Validating and restricting URL schemes, hostnames, resolved IP addresses, and ports before making requests
  • Blocking loopback, link-local, private, and other prohibited address ranges, including after DNS resolution and redirects
  • Applying destination-based network egress controls and protecting cloud metadata endpoints
  • Using a restricted outbound proxy with explicit destination allowlists or deny rules
  • Limiting which users can configure or execute workflows that make HTTP requests
  • Applying least privilege to internal services and runtime identities, so network reachability alone does not grant authorization

How teams detect issues like this

High-level detection approaches include:

  • Static analysis and code review for HTTP client calls that consume user-controlled URLs without destination validation
  • Reviewing proxy and network policies for missing destination restrictions, including handling of redirects and DNS resolution
  • Auditing remote-file, crawling, import, and workflow features for access controls and outbound-request constraints
  • Monitoring outbound requests for unexpected access to private, loopback, link-local, or metadata address ranges
  • Enforcing CI or deployment policies that require explicit egress rules and safe URL-fetching patterns

Sources

SourceLink
github.comgithub.com/langgenius/dify/commit/7bfcf9185c75bb18f0b44335080524e659f087d9
github.comgithub.com/langgenius/dify/pull/36332
github.comgithub.com/langgenius/dify/releases/tag/1.15.0
vulncheck.comvulncheck.com/advisories/dify-ssrf-protection-bypass-via-remote-files-endpoints

Frequently asked

questions

An authenticated console user who can access a URL-fetching feature or execute a relevant HTTP Request workflow may be able to trigger server-side requests.

The described attack surface is application-facing; direct host access is not necessarily required. The user's ability to reach and use an affected feature is a key condition.

Validate destinations in the request-making code and enforce destination-based egress restrictions as defense in depth. Account for DNS resolution, redirects, and prohibited IP ranges.

Treat user-supplied URLs as untrusted, restrict outbound network access by default, and review every feature that fetches remote content or sends workflow requests.

Find out what's already
exploitable in your codebase.