Summary
Flowise's Custom Function sandbox can be bypassed by authenticated users with permission to create or update chatflows or agentflows. The bypass may expose an unwrapped HTTP client, allowing attacker-controlled requests to reach loopback, internal-network, or cloud metadata services.
Affected context
The issue occurs in Flowise Custom Function processing when an allowlisted package is accessed through a module subpath that is not covered by the vm2 mock table. In affected configurations, the resulting HTTP client may bypass the sandbox's SSRF deny-list validation. Exploitation involves the /api/v1/node-custom-function endpoint and depends on the attacker having relevant flow permissions and the application being able to reach the target service.
Exploit preconditions
- Attack surface: Flowise's Custom Function processing through
/api/v1/node-custom-function - Required access: Authentication and permission to create or update chatflows or agentflows
- Trigger point: Execution of a Custom Function that accesses an allowlisted package through a subpath
- Why exploitation is possible: The subpath can evade the vm2 mock table and expose an HTTP client that does not apply
checkDenyListvalidation - Reachability condition: The Flowise server must be able to connect to the targeted loopback, internal-network, or metadata endpoint
Why this happens
The underlying flaw is an incomplete SSRF control boundary. The sandbox's mock table does not consistently cover package subpaths, allowing a module import to return an HTTP client outside the intended validation path. This is a CWE-918 issue because server-side requests can be directed to destinations that should be restricted. The root cause is relying on a partial module-mocking layer rather than enforcing destination controls on every outbound request.
Potential impact
- Attackers may map services reachable from the Flowise host.
- Requests could disclose credentials or other sensitive responses from internal services.
- Attackers could reach cloud metadata endpoints and may obtain sensitive instance information.
- POST requests could cause state changes on accessible internal systems.
General mitigation guidance
Mitigation generally centers on enforcing outbound-request policy at a boundary that cannot be bypassed by module resolution or sandbox behavior.
- Apply destination allowlists and block private, loopback, link-local, and metadata ranges for all outbound HTTP clients.
- Prefer secure-by-default execution environments that deny network access unless a flow explicitly requires it.
- Reduce trust in user-defined flow content and restrict who can create or modify chatflows and agentflows.
- Run Flowise with least-privilege network access and isolate it from sensitive internal services.
- Validate resolved destinations and redirects consistently, including for every supported HTTP method.
How teams detect issues like this
Detection can combine static analysis for sandboxed code that imports HTTP clients through package subpaths with code review of module-mocking and deny-list coverage. Review outbound network policies for access from Flowise to private, loopback, link-local, and metadata ranges. Runtime monitoring can flag unexpected requests from the Flowise process to internal destinations, especially requests initiated during Custom Function execution. Policy checks can also limit flow-editing permissions and require review of flows that use custom code.

