{"id":"GHSA-8r8h-6vcc-xhrv","summary":"Flowise: RBAC Bypass Leading to Unauthorized Workspace Variables Disclosure","details":"## Finding — Unauthorized Workspace Variables disclosure via $vars injection (bypasses variables:view)\n\n  ### What’s wrong (code locations)\n\n  - Variables for the active workspace are fetched without checking “variables:view” at this call site: flowise-src/\n    packages/components/src/utils.ts:932\n  - Runtime variables are resolved from server environment variables: flowise-src/packages/components/src/utils.ts:976\n  - $vars is always injected into the code execution sandbox: flowise-src/packages/components/src/utils.ts:1782\n  - The official Variables API is permission-protected (contrast): flowise-src/packages/server/src/routes/variables/\n    index.ts:11\n\n  ### Why it is a privilege boundary bypass\n\n  A user/API key might be denied variables:view (and the /api/v1/variables route enforces it), but they can still:\n\n  - call /api/v1/node-custom-function (Finding 1)\n  - and have $vars pre-populated with all variables for the workspace, including runtime values from process.env\n\n  ### What data is exposed\n\n  Inside the custom JS context, $vars contains a flat map of:\n\n  - Variable.name -\u003e Variable.value for static variables, and\n  - Variable.name -\u003e process.env[Variable.name] for runtime variables (type === 'runtime')\n\n  This can expose secrets such as database passwords, JWT secrets, SMTP passwords, cloud keys, etc., depending on what\n  the workspace Variables are configured to map.\n\n  ### Recommended fix (minimum)\n\n  - Do not inject $vars unless the caller is authorized:\n      - enforce variables:view before injecting $vars, or\n      - inject only an explicit allowlist of variables needed for the function\n  - Consider disabling or heavily restricting type=runtime variables in self-hosted environments (or restrict which env\n    keys may be mapped).","aliases":["CVE-2026-70471"],"modified":"2026-08-04T18:11:01.113556Z","published":"2026-08-04T17:43:36Z","database_specific":{"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2026-08-04T17:43:36Z","nvd_published_at":null,"cwe_ids":["CWE-863"]},"references":[{"type":"WEB","url":"https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-8r8h-6vcc-xhrv"},{"type":"PACKAGE","url":"https://github.com/FlowiseAI/Flowise"},{"type":"WEB","url":"https://github.com/FlowiseAI/Flowise/releases/tag/flowise@3.1.3"}],"affected":[{"package":{"name":"flowise","ecosystem":"npm","purl":"pkg:npm/flowise"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.1.3"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-8r8h-6vcc-xhrv/GHSA-8r8h-6vcc-xhrv.json","last_known_affected_version_range":"\u003c= 3.1.2"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"}]}