/

CVE-2026-69253

Severity:

HIGH RISK

(8.8)

Code Injection (CWE-95) in Flowise Custom Tool Components

CVE-2026-69253

Analyzed

Vulnerability type

Category:

Code Injection

CWE:

CWE-95

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Flowise custom-tool components could insert an authenticated user's baseURL value directly into JavaScript source executed inside an in-process vm2 sandbox. A crafted value that passed URL validation could break out of the intended string and inject JavaScript, potentially enabling arbitrary code execution on the Flowise server.

Flowise custom-tool components could insert an authenticated user's baseURL value directly into JavaScript source executed inside an in-process vm2 sandbox. A crafted value that passed URL validation could break out of the intended string and inject JavaScript, potentially enabling arbitrary code execution on the Flowise server.

Affected context

The vulnerability occurs in Flowise deployments using the AgentAsTool, ChatflowTool, or ExecuteFlow components before the relevant security fix. It requires a user-controlled baseURL to be incorporated into generated JavaScript source for execution in the vm2 sandbox. Risk is increased where the sandbox has access to sensitive dependencies, environment data, filesystem resources, or process privileges.

The vulnerability occurs in Flowise deployments using the AgentAsTool, ChatflowTool, or ExecuteFlow components before the relevant security fix. It requires a user-controlled baseURL to be incorporated into generated JavaScript source for execution in the vm2 sandbox. Risk is increased where the sandbox has access to sensitive dependencies, environment data, filesystem resources, or process privileges.

Exploit preconditions

  • Attack surface: Authenticated Flowise custom-tool and flow configuration functionality
  • Required access: A valid authenticated session with permission to configure or invoke the affected components
  • Trigger point: Generation and execution of sandboxed JavaScript containing the supplied baseURL
  • Why exploitation is possible: URL validation checks format but does not prevent JavaScript string-breaking characters or distinguish data from executable source
  • Execution context: The injected code runs in the Flowise Node.js process and may be able to escape the in-process sandbox
  • Attack surface: Authenticated Flowise custom-tool and flow configuration functionality
  • Required access: A valid authenticated session with permission to configure or invoke the affected components
  • Trigger point: Generation and execution of sandboxed JavaScript containing the supplied baseURL
  • Why exploitation is possible: URL validation checks format but does not prevent JavaScript string-breaking characters or distinguish data from executable source
  • Execution context: The injected code runs in the Flowise Node.js process and may be able to escape the in-process sandbox

Why this happens

The underlying bug is code generation from untrusted input. The application interpolated a user-controlled URL directly into a JavaScript string instead of passing it to the sandbox as a data value. Although the value underwent URL validation, that validation did not provide JavaScript-context escaping or safe separation between code and data. This behavior maps to CWE-95: Improper Neutralization of Directives in Dynamically-Evaluated Code, commonly described as code injection.

The underlying bug is code generation from untrusted input. The application interpolated a user-controlled URL directly into a JavaScript string instead of passing it to the sandbox as a data value. Although the value underwent URL validation, that validation did not provide JavaScript-context escaping or safe separation between code and data. This behavior maps to CWE-95: Improper Neutralization of Directives in Dynamically-Evaluated Code, commonly described as code injection.

Potential impact

  • An attacker may execute arbitrary JavaScript in the Flowise server process.
  • The attacker could potentially execute operating-system commands with the Flowise process privileges.
  • Sensitive environment variables, credentials, configuration, or flow data could be exposed.
  • The application could be modified, disrupted, or used for lateral movement.
  • Hosted LLM workflows and connected services could be manipulated or abused.
  • An attacker may execute arbitrary JavaScript in the Flowise server process.
  • The attacker could potentially execute operating-system commands with the Flowise process privileges.
  • Sensitive environment variables, credentials, configuration, or flow data could be exposed.
  • The application could be modified, disrupted, or used for lateral movement.
  • Hosted LLM workflows and connected services could be manipulated or abused.

General mitigation guidance

Mitigation should focus on preserving a strict separation between executable code and user-controlled data.

Common defensive patterns include:

  • Passing URLs and other configuration values to the sandbox through structured data or controlled function arguments rather than source-code interpolation.
  • Applying context-appropriate encoding whenever values must be represented in generated code.
  • Using strict URL parsing and allowlisting for permitted schemes, hosts, ports, and path forms.
  • Reducing or removing risky dependencies and host capabilities exposed to in-process sandboxes.
  • Treating in-process sandboxing as a defense-in-depth control rather than a complete isolation boundary.
  • Running the service with least privilege and limiting filesystem, network, credential, and process access.
  • Separating untrusted workflow execution into a strongly isolated execution environment where practical.

Mitigation should focus on preserving a strict separation between executable code and user-controlled data.

Common defensive patterns include:

  • Passing URLs and other configuration values to the sandbox through structured data or controlled function arguments rather than source-code interpolation.
  • Applying context-appropriate encoding whenever values must be represented in generated code.
  • Using strict URL parsing and allowlisting for permitted schemes, hosts, ports, and path forms.
  • Reducing or removing risky dependencies and host capabilities exposed to in-process sandboxes.
  • Treating in-process sandboxing as a defense-in-depth control rather than a complete isolation boundary.
  • Running the service with least privilege and limiting filesystem, network, credential, and process access.
  • Separating untrusted workflow execution into a strongly isolated execution environment where practical.

How teams detect issues like this

Detection can include:

  • Static analysis rules that identify string interpolation or concatenation of user-controlled values into JavaScript passed to evaluators, virtual machines, or sandbox APIs.
  • Code review checks for generated source code, dynamic evaluation, template-based scripts, and validation performed without context-specific encoding.
  • Tests using boundary characters and malformed-but-parser-accepted URL values to verify that inputs remain data.
  • Policy enforcement that restricts dynamic code execution and reviews dependencies exposed to workflow sandboxes.
  • Runtime monitoring for unexpected child processes, outbound connections, filesystem access, or changes initiated by the Flowise service account.
  • Automated security review tools can help identify unsafe code-generation patterns, but findings should be validated against the actual execution boundary.

Detection can include:

  • Static analysis rules that identify string interpolation or concatenation of user-controlled values into JavaScript passed to evaluators, virtual machines, or sandbox APIs.
  • Code review checks for generated source code, dynamic evaluation, template-based scripts, and validation performed without context-specific encoding.
  • Tests using boundary characters and malformed-but-parser-accepted URL values to verify that inputs remain data.
  • Policy enforcement that restricts dynamic code execution and reviews dependencies exposed to workflow sandboxes.
  • Runtime monitoring for unexpected child processes, outbound connections, filesystem access, or changes initiated by the Flowise service account.
  • Automated security review tools can help identify unsafe code-generation patterns, but findings should be validated against the actual execution boundary.

Sources

SourceLink
github.comgithub.com/FlowiseAI/Flowise/commit/3f257bdc8196082a178da7134a075824401b13b9
github.comgithub.com/FlowiseAI/Flowise/pull/6417
github.comgithub.com/FlowiseAI/Flowise/releases/tag/flowise@3.1.3
github.comgithub.com/FlowiseAI/Flowise/security/advisories/GHSA-wg86-r78f-74mp

Frequently asked

questions

It can be exploitable through Flowise's authenticated application interface when an attacker can configure or trigger an affected custom-tool component. It does not generally require local access to the server.

Exploitation requires an authenticated session with sufficient permissions to control the relevant baseURL or workflow configuration. The exact scope depends on the deployment's authorization model.

Keep user-controlled URLs and configuration values out of generated JavaScript source. Pass them as structured data, apply strict allowlisting, and minimize the capabilities available to any code-execution environment.

Avoid dynamic code generation from untrusted input, perform context-specific validation and encoding, review sandbox boundaries, and run workflow services with least privilege and strong network and filesystem restrictions.

It can be exploitable through Flowise's authenticated application interface when an attacker can configure or trigger an affected custom-tool component. It does not generally require local access to the server.

Exploitation requires an authenticated session with sufficient permissions to control the relevant baseURL or workflow configuration. The exact scope depends on the deployment's authorization model.

Keep user-controlled URLs and configuration values out of generated JavaScript source. Pass them as structured data, apply strict allowlisting, and minimize the capabilities available to any code-execution environment.

Avoid dynamic code generation from untrusted input, perform context-specific validation and encoding, review sandbox boundaries, and run workflow services with least privilege and strong network and filesystem restrictions.

Find out what's already
exploitable in your codebase.