CVE-2026-58141: 
Dify vulnerability analysis and mitigation

Overview

CVE-2026-58141 is a Server-Side Request Forgery (SSRF) vulnerability in Dify, an open-source LLM application development platform maintained by langgenius. It affects Dify versions 0.6.0 through 1.14.x (all versions before 1.15.0) and allows any authenticated console user to bypass SSRF protections and issue arbitrary HTTP requests to internal services and cloud metadata endpoints. The vulnerability was published on November 6, 2026, with a patch released in Dify 1.15.0. It carries a CVSS v3.1 score of 7.6 (High) and a CVSS v4.0 score of 7.2 (High) (Github Advisory, Feedly).

Technical details

The root cause is a misconfigured Squid proxy (CWE-918: Server-Side Request Forgery) where the proxy configuration defines only source-based ACLs without any destination deny rules, and the make_request() helper function performs no independent destination IP validation. This dual omission means that any request routed through the proxy is not filtered by destination, allowing attackers to reach loopback addresses, private RFC-1918 networks, link-local addresses, and cloud metadata endpoints (e.g., 169.254.169.254 on AWS). Exploitation is possible through multiple Dify endpoints: GET /console/api/remote-files/<url>, POST /console/api/remote-files/upload, the HTTP Request workflow node, website crawl functionality, and document import from URL. The HTTP Request workflow node is particularly dangerous as it supports POST, PUT, and DELETE methods, enabling write operations against internal services that rely solely on network isolation for authorization (Github Advisory, Dify PR #36332).

Impact

Successful exploitation allows authenticated console users to access internal components including the sandbox environment, internal APIs, and PostgreSQL databases. On AWS-hosted deployments, attackers can read IAM credentials from the instance metadata service (http://169.254.254.169.254/latest/meta-data/iam/), potentially enabling lateral movement to other AWS resources. The HTTP Request workflow node further enables unauthorized write operations (POST, PUT, DELETE) to internal services that rely on network isolation for authorization, posing a significant integrity risk in addition to the high confidentiality impact (Github Advisory, Feedly).

Exploitability

There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at the time of disclosure, according to NVD SSVC assessment and Feedly threat intelligence. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.40% (35th percentile), indicating a relatively low near-term exploitation probability. However, the vulnerability is rated as automatable by NVD SSVC, and the low privilege requirement (any authenticated console user) lowers the exploitation barrier significantly (Github Advisory, Feedly).

Exploitation steps

  1. Gain Console Access: Obtain credentials for any authenticated Dify console user account (e.g., via phishing, credential stuffing, or a free/trial account on a self-hosted instance).
  2. Identify Target Endpoints: Confirm the Dify instance is running a version before 1.15.0 by checking the UI version indicator or API responses.
  3. Craft SSRF Request via Remote Files: Send a crafted GET request to GET /console/api/remote-files/<url> where <url> is an internal address such as http://169.254.169.254/latest/meta-data/iam/security-credentials/ (AWS metadata) or http://postgres:5432/ (internal PostgreSQL).
  4. Alternatively, Use HTTP Request Workflow Node: Create or modify a Dify workflow to include an HTTP Request node configured to send requests to internal addresses (e.g., http://sandbox/, http://internal-api/), leveraging POST/PUT/DELETE for write operations.
  5. Alternatively, Use Document Import or Website Crawl: Trigger document import from URL or website crawl features pointing to internal endpoints to retrieve internal service responses.
  6. Exfiltrate Credentials or Data: On AWS deployments, parse the returned IAM credentials from the metadata service response to obtain access keys for lateral movement to other AWS services (Github Advisory, Dify PR #36332).

Indicators of compromise

  • Network: Outbound HTTP requests from the Dify server or Squid proxy to 169.254.169.254 (AWS IMDSv1) or other cloud metadata endpoints; unexpected connections to internal RFC-1918 addresses (10.x.x.x, 172.16-31.x.x, 192.168.x.x) or loopback (127.0.0.1) from the Squid proxy process.
  • Logs: Squid proxy access logs (/var/log/squid/access.log) showing requests to internal IP ranges or metadata endpoints originating from Dify API service; Dify API logs showing repeated calls to /console/api/remote-files/ with internal or metadata URLs as parameters.
  • Application Behavior: Unusual workflow executions containing HTTP Request nodes targeting non-public IP addresses; document import or website crawl jobs referencing internal hostnames or IP addresses.
  • File System: Unexpected credential files or data dumps written by Dify worker processes; new files in Dify storage directories containing internal API responses or IAM credential JSON.

Mitigation and workarounds

The primary remediation is to upgrade Dify to version 1.15.0 or later, which hardens the Squid proxy configuration by adding destination deny rules for loopback, private, CGN, link-local, ULA, multicast, reserved, and cloud metadata target networks (Dify Release 1.15.0, Dify PR #36332). For deployments that cannot immediately upgrade, the following mitigations should be applied: (1) Manually update the Squid proxy configuration (squid.conf.template) to add explicit deny ACLs for destination networks including 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and 169.254.0.0/16; (2) Implement network-level egress filtering to block Dify's outbound access to internal services and metadata endpoints; (3) Restrict console user access to only trusted personnel. Version 1.15.0 also introduces SSRF_PROXY_ALLOW_PRIVATE_IPS and SSRF_PROXY_ALLOW_PRIVATE_DOMAINS environment variables as explicit allowlist escape hatches for trusted private-network deployments (Dify PR #36332).

Community reactions

The vulnerability was reported and assigned by VulnCheck, which published a dedicated advisory. The fix was developed by Dify maintainer laipz8200 and merged into the main branch on June 18, 2026, as part of a broader effort to harden SSRF proxy egress defaults. The Dify team acknowledged the issue in the 1.15.0 release notes under "Bug Fixes," noting hardened default SSRF proxy egress. No significant public researcher commentary or social media discussion has been observed beyond standard vulnerability database aggregation (Dify Release 1.15.0, VulnCheck Advisory).

Additional resources


Source: This report was generated using AI

Related Dify vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-61461HIGH8.7
  • Dify logoDify
  • cpe:2.3:a:dify:dify
NoYesJul 10, 2026
CVE-2026-105762HIGH8.3
  • Dify logoDify
  • cpe:2.3:a:dify:dify
NoYesOct 06, 2026
CVE-2026-58141HIGH7.2
  • Dify logoDify
  • cpe:2.3:a:dify:dify
NoYesNov 06, 2026
CVE-2026-105761HIGH7.1
  • Dify logoDify
  • cpe:2.3:a:dify:dify
NoYesOct 05, 2026
CVE-2026-18266MEDIUM5.4
  • Dify logoDify
  • cpe:2.3:a:dify:dify
NoYesJul 29, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management