GHSA-8r8h-6vcc-xhrv: Npm/flowise vulnerability
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).
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 - Configuration
Enforce variables:view authorization (or equivalent variables permission check) before injecting $vars for /api/v1/node-custom-function; if the caller is not authorized, do not populate $vars with workspace variables (including runtime values from process.env).
Flowise (node custom function /api/v1/node-custom-function) $vars injection into code execution sandbox = only if caller is authorized; otherwise do not inject $vars - Configuration
Instead of pre-populating $vars with all workspace variables, inject only an explicit allowlist of the variables needed by the custom function; do not inject runtime values indiscriminately.
Flowise (node custom function /api/v1/node-custom-function) $vars contents = explicit allowlist only
Event History
Frequently Asked Questions
What is the severity of GHSA-8r8h-6vcc-xhrv?
The severity of GHSA-8r8h-6vcc-xhrv is rated at 68, indicating a significant risk of unauthorized access.
How do I fix GHSA-8r8h-6vcc-xhrv?
To fix GHSA-8r8h-6vcc-xhrv, ensure that access to workspace variables is properly restricted and implement checks for 'variables:view' before variable retrieval.
What is GHSA-8r8h-6vcc-xhrv about?
GHSA-8r8h-6vcc-xhrv addresses a vulnerability that allows unauthorized disclosure of workspace variables via $vars injection.
Which software is affected by GHSA-8r8h-6vcc-xhrv?
The vulnerability GHSA-8r8h-6vcc-xhrv affects the npm package 'flowise'.
When was GHSA-8r8h-6vcc-xhrv published?
GHSA-8r8h-6vcc-xhrv was published on August 4, 2026.