Описание
Flowise: SSRF Protection Bypass via Unprotected Built-in HTTP Modules in Custom Function Sandbox
Summary
A Server-Side Request Forgery (SSRF) protection bypass vulnerability exists in the Custom Function feature. While the application implements SSRF protection via HTTP_DENY_LIST for axios and node-fetch libraries, the built-in Node.js http, https, and net modules are allowed in the NodeVM sandbox without equivalent protection. This allows authenticated users to bypass SSRF controls and access internal network resources (e.g., cloud provider metadata services)
Details
The vulnerability exists in the sandbox configuration within packages/components/src/utils.ts
Vulnerable Code - Allowed Built-in Modules (Line 56):
SSRF Protection Implementation (Lines 254-261):
Root Cause:
- The
secureWrappersobject only contains mocked versions ofaxiosandnode-fetchthat enforceHTTP_DENY_LIST - The built-in
http,https, andnetmodules are passed directly to the sandbox viabuiltinDepswithout any SSRF protection - Users can import these modules directly and make arbitrary HTTP requests, which completely bypasses the intended security controls
Affected File: packages/components/src/utils.ts
Related Files:
packages/components/src/httpSecurity.ts- Contains checkDenyList() function only used by axios/node-fetch wrapperspackages/server/src/controllers/nodes/index.ts- API endpoint accepting user-controlled JavaScript codepackages/server/src/services/nodes/index.ts- Service layer executing the code
PoC
Prerequisites:
- Flowise instance with
HTTP_DENY_LISTconfigured (e.g.,HTTP_DENY_LIST=127.0.0.1,169.254.169.254,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16) - Valid API key or authenticated session
- For full impact demonstration - Flowise running on AWS EC2 with an IAM role attached
Verify SSRF Protection is enabled (expect a block message by policy)
Request:
Response:
Bypass SSRF Protection using built-in http module
Request:
Response:
Impact
Vulnerability Type: Server-Side Request Forgery (SSRF) with security controls bypass
Who is Impacted:
- All Flowise deployments where
HTTP_DENY_LISTis configured for SSRF protection - Deployments without
HTTP_DENY_LISTare already vulnerable to SSRF via any method
Impact Severity:
- Attackers can steal temporary IAM credentials from metadata services, which allows gaining access to other cloud resources
- Scan internal networks, discover services, and identify attack targets
- Reach databases, admin panels, and other internal APIs that should not be externally accessible
Attack Requirements:
- Authentication required (API key or session)
- Network access to Flowise instance
Пакеты
flowise
<= 3.0.13
3.1.0
flowise-components
<= 3.0.13
3.1.0
Связанные уязвимости
Flowise is a drag & drop user interface to build a customized large language model flow. Prior to 3.1.0, a Server-Side Request Forgery (SSRF) protection bypass vulnerability exists in the Custom Function feature. While the application implements SSRF protection via HTTP_DENY_LIST for axios and node-fetch libraries, the built-in Node.js http, https, and net modules are allowed in the NodeVM sandbox without equivalent protection. This allows authenticated users to bypass SSRF controls and access internal network resources (e.g., cloud provider metadata services) This vulnerability is fixed in 3.1.0.