CVE-2026-70471: Flowise: RBAC Bypass Leading to Unauthorized Workspace Variables Disclosure
Finding — Unauthorized Workspace Variables disclosure via $vars injection (bypasses variables:view)
### What’s wrong (code locations)
- Variables for the active workspace are fetched without checking “variables:view” at this call site: flowise-src/ packages/components/src/utils.ts:932 - Runtime variables are resolved from server environment variables: flowise-src/packages/components/src/utils.ts:976 - $vars is always injected into the code execution sandbox: flowise-src/packages/components/src/utils.ts:1782 - The official Variables API is permission-protected (contrast): flowise-src/packages/server/src/routes/variables/ index.ts:11
### Why it is a privilege boundary bypass
A user/API key might be denied variables:view (and the /api/v1/variables route enforces it), but they can still:
- call /api/v1/node-custom-function (Finding 1) - and have $vars pre-populated with all variables for the workspace, including runtime values from process.env
### What data is exposed
Inside the custom JS context, $vars contains a flat map of:
- Variable.name -> Variable.value for static variables, and - Variable.name -> process.env[Variable.name] for runtime variables (type === 'runtime')
This can expose secrets such as database passwords, JWT secrets, SMTP passwords, cloud keys, etc., depending on what the workspace Variables are configured to map.
### Recommended fix (minimum)
- Do not inject $vars unless the caller is authorized: - enforce variables:view before injecting $vars, or - inject only an explicit allowlist of variables needed for the function - Consider disabling or heavily restricting type=runtime variables in self-hosted environments (or restrict which env keys may be mapped).
Other sources
Flowise is a drag-and-drop user interface for building customized large language model (LLM) flows. Prior to 3.1.3, Flowise injects $vars into the code execution sandbox without requiring variables:view, bypassing the permission-protected Variables API. Variables for the active workspace are fetched at packages/components/src/utils.ts and runtime variables are resolved from server environment variables, while the official variables route enforces variables:view. A user or API key that is denied variables:view can call /api/v1/node-custom-function and receive $vars pre-populated with all variables for the workspace, including Variable.name to Variable.value static variables and Variable.name to process.env[Variable.name] runtime variables. This can expose secrets such as database passwords, JWT secrets, SMTP passwords, and cloud keys, depending on the workspace Variables configuration. This issue is fixed in version 3.1.3.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/flowiseto a version that resolves this vulnerability.Fixed in 3.1.3 - Upgrade
Upgrade
Flowiseto a version that resolves this vulnerability.Fixed in 3.1.3 - Configuration
In Flowise code execution sandbox (where $vars is pre-populated), prevent injecting $vars unless the caller is authorized for variables:view; implement enforcement at the /api/v1/node-custom-function call site, or inject only an allowlist of variables required for the custom function (avoid injecting full workspace variables, including runtime values).
Flowise (custom JS/function execution sandbox) $vars injection / variables:view enforcement = enforce variables:view before injecting $vars; alternatively inject only an explicit allowlist of variables needed for the function
Event History
Frequently Asked Questions
What is the severity of CVE-2026-70471?
The severity of CVE-2026-70471 is rated at 73.
How do I fix CVE-2026-70471?
To fix CVE-2026-70471, ensure proper authorization checks are implemented for retrieving workspace variables.
What type of vulnerability is CVE-2026-70471?
CVE-2026-70471 is an RBAC (Role-Based Access Control) bypass vulnerability.
What can be exploited with CVE-2026-70471?
CVE-2026-70471 can be exploited to disclose unauthorized workspace variables.
In which software is CVE-2026-70471 found?
CVE-2026-70471 is found in the npm package Flowise.