/

CVE-2026-41270

Severity:

HIGH RISK

(7.1)

SSRF in Flowise Custom Function Sandbox

CVE-2026-41270

Modified

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-284, CWE-918

Impact:

Internal Network Access and SSRF via Sandbox Escape of Network Controls

Severity:

HIGH RISK

(7.1)

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) protection bypass in Flowise's Custom Function feature allows authenticated users to reach internal network resources by abusing unprotected Node.js core networking modules inside the sandbox.

Because only axios and node-fetch are filtered while http, https, and net remain unrestricted, attackers can craft custom flows that circumvent the HTTP_DENY_LIST and probe services such as cloud provider metadata endpoints.

Affected context

This issue arises in Flowise deployments that:

  • Enable and use the Custom Function feature to run user-provided JavaScript in a NodeVM sandbox
  • Rely on HTTP_DENY_LIST-based SSRF controls applied only to axios and node-fetch
  • Run the Flowise server with network access to internal services, cloud metadata endpoints, or other non-public infrastructure

Under these conditions, authenticated users with permission to create or edit flows can invoke low-level Node.js networking modules to reach targets that the higher-level HTTP client denylist was meant to protect.

Exploit preconditions

  • Attack surface: Flowise HTTP interface where users define and execute Custom Functions as part of LLM flows.
  • Required access: Authenticated access with the ability to create, modify, or execute a Custom Function node in a flow.
  • Trigger point: Execution of a crafted Custom Function that uses Node.js core modules (http, https, net) to initiate outbound connections.
  • Why exploitation is possible: SSRF protections are implemented only around axios and node-fetch using HTTP_DENY_LIST, while the NodeVM sandbox still exposes Node.js core networking modules without equivalent host/IP/URL validation, allowing network requests that bypass the denylist.

Why this happens

The core issue is an incomplete enforcement of SSRF defenses across all outbound HTTP mechanisms used within the sandboxed execution environment.

The design applies URL/host restrictions to specific high-level HTTP client libraries (axios, node-fetch) but overlooks lower-level primitives (http, https, net) that provide equivalent or greater network access. Within the NodeVM sandbox, these core modules remain available and unfiltered, enabling users to manually construct network requests that do not pass through the denylist logic.

Conceptually, this maps to:

  • CWE-918: Server-Side Request Forgery (SSRF) — user-controlled URLs or network targets are requested by the server, allowing access to internal or protected resources.
  • CWE-284: Improper Access Control — security controls are scoped to specific libraries instead of the broader capability (outbound network access), leaving alternative code paths unguarded.

The underlying pattern is failing to treat "network access" as the protected capability, focusing instead on selected APIs, which leaves residual, equally powerful APIs exposed.

Potential impact

  • Authenticated users may reach internal HTTP(S) services not otherwise exposed to the public internet.
  • Attackers can potentially access cloud provider metadata services, which can leak credentials, tokens, or configuration secrets.
  • Internal APIs, admin panels, or databases exposed over internal networks can be probed or interacted with through crafted requests.
  • Network topology and internal service enumeration may be possible, aiding subsequent lateral movement or targeted attacks.
  • Misconfigured services reachable from the Flowise server can be abused for data exfiltration or configuration tampering.

General mitigation guidance

Effective mitigation centers on treating outbound network access as a privileged capability and enforcing uniform controls across all ways of making requests:

  • Consolidate network egress checks: Route all outbound HTTP(S)/TCP connections from sandboxed code through a single, policy-enforcing layer that validates destinations against allowlists or strict patterns, regardless of the client library or module used.
  • Restrict exposed modules in sandboxes: Avoid exposing raw networking primitives (http, https, net, tls, dns) to user-controlled code in the NodeVM unless they are wrapped with robust validation and authorization logic.
  • Adopt an allowlist-centric policy: Prefer explicit allowlists of reachable hosts, IP ranges, or service endpoints over denylists, especially when the environment has access to sensitive metadata or management planes.
  • Apply least privilege at the network level: Use network segmentation, container-level egress rules, or cloud security groups to limit what the Flowise server can reach, reducing the blast radius of any SSRF.
  • Harden custom script features: Clearly define trust boundaries for user scripts and treat them as untrusted; design the execution API to surface only narrowly scoped, vetted capabilities instead of broad runtime access.

How teams detect issues like this

Detecting and monitoring for this class of weakness involves both code-level review and runtime observation:

  • Static analysis & code scanning:
  • Search for use of NodeVM or similar sandbox constructs that expose full Node.js environments to user-controlled scripts.
  • Flag any exposure of core networking modules (http, https, net, tls, dns) in untrusted execution contexts.
  • Identify authorization or validation logic that applies only to specific libraries (axios, node-fetch) rather than to a generalized "network access" interface.
  • Code review practices:
  • During review of features that run user code, verify that all sensitive side effects (network, filesystem, process spawning) are mediated via controlled APIs.
  • Confirm that SSRF controls are centralized and independent of specific HTTP client libraries, and that they account for IP-level bypasses (e.g., localhost, link-local, metadata IPs).
  • Runtime monitoring & logging:
  • Instrument outbound HTTP(S)/TCP connections from the Flowise server, logging destination hosts, IPs, and paths to detect anomalous access to internal or metadata endpoints.
  • Establish alerts for traffic to known-sensitive targets (e.g., 169.254.169.254 or provider-specific metadata hostnames).
  • Security testing & policy enforcement:
  • Include SSRF-focused tests in QA and security assessments for features that allow custom scripting.
  • Use automated security testing tools or custom scripts to attempt network access from within the sandbox and validate that policies are enforced consistently.

Sources

SourceLink
github.comgithub.com/FlowiseAI/Flowise/security/advisories/GHSA-xhmj-rg95-44hv

Frequently asked

questions

It is not anonymous and internet-wide in the typical sense; exploitation requires authenticated access to the Flowise instance and the ability to define or run Custom Functions. However, once authenticated, a user can cause the server to make requests to internal or otherwise restricted targets.

An attacker must be able to sign in to Flowise and create or modify flows containing Custom Functions, or otherwise execute existing flows that they control. No direct access to the underlying server or network is required; the vulnerability abuses the server's own network privileges.

The most robust fix is to centralize outbound network access behind a single, validated interface and completely remove or strongly restrict direct access to low-level networking modules in untrusted execution environments. All requests from sandboxed code should pass through a security gateway that enforces allowlists and other SSRF protections.

Treat any user-supplied code or configuration as untrusted, and design execution environments with a capability-based mindset: only expose narrowly scoped, well-audited APIs for needed actions. Apply network and resource controls at the capability level rather than at individual libraries, and include SSRF and sandbox-escape scenarios in the threat model and security testing for new features.

Find out what's already
exploitable in your codebase.