Cloudanix VulnDB

CVE-2024-31621

High · 7.6

CVSS

7.6

EPSS

59.9%

Published

Apr 29, 2024

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Attend

A flaw in older Flowise systems can let a logged-in attacker run commands on the server and steal or change connected business automation data.

Weaponized
Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Low
Impact
Remote Code Execution
Component
Application
Class
RCE
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

CVE-2024-31621 is a remote code execution vulnerability in FlowiseAI Flowise version 1.6.2 and earlier. An authenticated remote attacker with low privileges can send a crafted script to the api/v1 component and cause the Flowise application server to execute attacker-controlled code in the context of the running Flowise process. Depending on how Flowise is deployed, this can allow command execution on the host or container, access to environment variables and secrets, modification of flows or application data, and use of the compromised server as a foothold for further internal access.

Why it matters to the business

A compromised Flowise instance can expose API keys, credentials, workflow logic, prompts, connected data sources, and automation integrations. Because Flowise is commonly connected to LLM providers, databases, internal tools, and business workflows, exploitation can lead to data theft, service disruption, tampering with automated processes, and unauthorized use of cloud or AI service accounts. The exploit is reported as weaponized and EPSS is high, so internet-exposed or broadly accessible Flowise deployments should be treated as urgent even though the vulnerability is not currently listed in CISA KEV and is not specifically associated with ransomware campaigns.

How an attack unfolds

An attacker first identifies a reachable Flowise instance and obtains or reuses valid low-privilege access. They then interact with the api/v1 component and submit a crafted script or payload that reaches vulnerable server-side execution logic. Instead of being safely constrained, the script executes arbitrary commands or code under the privileges of the Flowise server process. The attacker can then enumerate environment variables, harvest API tokens and credentials, inspect or alter configured flows, install persistence such as cron jobs or startup scripts, download additional tooling, and pivot to services reachable from the Flowise host or container network.

How to fix it

Upgrade Flowise to a version newer than 1.6.2 that contains the vendor fix; if exact package-specific fixed versions are not available, use the latest stable Flowise release from the official project. After upgrading, rotate credentials that may have been accessible to the Flowise process, including LLM provider API keys, database passwords, webhook secrets, OAuth tokens, and service account keys. Restrict access to Flowise and its api/v1 routes using network controls, VPN, private ingress, IP allowlisting, or a reverse proxy. Enforce strong authentication and least-privilege user roles. Disable or tightly control features that allow user-supplied script execution where possible. Run Flowise with a non-root user, minimal filesystem permissions, restricted container capabilities, read-only filesystems where practical, and no unnecessary outbound network access. If immediate upgrade is not possible, remove public exposure, block untrusted access to api/v1, and monitor aggressively for suspicious script execution and child processes spawned by the Flowise/Node.js process.

How to confirm the fix worked

Confirm all Flowise deployments report a version later than 1.6.2 or match the latest vendor-fixed release. Validate that unauthenticated or low-privilege users cannot submit executable script payloads to api/v1 endpoints. Review reverse proxy, WAF, and application routing rules to ensure Flowise administrative and API endpoints are not internet-accessible unless explicitly required. From the host or container, confirm the Flowise process runs as a non-root user and cannot write to sensitive system paths. Test that the application still functions after upgrade and credential rotation. Security teams should also perform a targeted retrospective review of Flowise application logs, proxy logs, container logs, and EDR telemetry for suspicious api/v1 requests and unexpected child processes from the Node.js/Flowise runtime.

Typical attack path

  1. Identify an exposed Flowise deployment, commonly by scanning web services for Flowise-specific pages, headers, or API behavior.
  2. Authenticate using valid low-privilege credentials, stolen credentials, default/weak credentials, or an existing session token.
  3. Send a crafted script payload to the vulnerable api/v1 component.
  4. Achieve code execution in the context of the Flowise application process, typically a Node.js runtime.
  5. Run discovery commands to collect host, container, network, and environment information.
  6. Extract secrets such as LLM provider keys, database credentials, webhook tokens, and integration credentials from environment variables, configuration files, or Flowise data.
  7. Modify flows, exfiltrate sensitive workflow data, deploy persistence, or use the server as a pivot point to reach connected systems.

How to detect it

Investigate whether Flowise received unusual api/v1 requests, especially from unfamiliar IP addresses, newly created users, or low-privilege accounts. Review Flowise application logs, web server or reverse proxy logs, container stdout/stderr, cloud load balancer logs, WAF events, identity provider logs, EDR process telemetry, DNS logs, and outbound firewall/proxy logs. Look for api/v1 requests containing script-like content, Node.js module imports, child process calls, shell metacharacters, base64-encoded commands, or download-and-execute patterns. On hosts and containers, hunt for Node.js or Flowise spawning shells or utilities such as sh, bash, cmd.exe, powershell.exe, curl, wget, nc, python, perl, or openssl. Review environment variable access, suspicious reads of configuration files, unexpected modifications to Flowise flows, new users or API tokens, abnormal outbound connections to paste sites, file-sharing services, tunneling domains, cryptocurrency mining pools, or unfamiliar VPS infrastructure. If suspicious activity is found, preserve logs and container images, isolate the instance, rotate secrets, and rebuild from a trusted patched image.

  • /api/v1
  • Flowise
  • require('child_process')
  • require("child_process")
  • child_process.exec
  • child_process.spawn
  • child_process.execSync
  • process.env
  • /bin/sh -c
  • /bin/bash -c
  • cmd.exe /c
  • powershell.exe
  • curl http
  • curl https
  • wget http
  • wget https
  • bash -i
  • nc -e
  • ncat -e
  • python -c
  • python3 -c
  • perl -e
  • base64 -d
  • chmod +x
  • /tmp/
  • /var/tmp/
  • node

What your security team should do

  • Prioritize remediation for any Flowise instance exposed to the internet or reachable by large internal user populations because the exploit is weaponized and EPSS is high.
  • Upgrade all Flowise deployments from version 1.6.2 or earlier to the latest fixed stable version.
  • Immediately restrict network access to Flowise administrative and api/v1 endpoints while patching is underway.
  • Rotate all secrets accessible to the Flowise process, especially LLM provider keys, database credentials, webhook tokens, and integration credentials.
  • Hunt for evidence of exploitation by correlating api/v1 requests with Node.js child process creation, outbound network connections, and unexpected file writes.
  • Review Flowise users, sessions, API tokens, flows, and integrations for unauthorized changes.
  • Deploy detection rules for suspicious script content, use of Node.js child_process APIs, shell invocation, and post-exploitation download commands.
  • Harden the runtime by using least-privilege service accounts, container isolation, restricted egress, and read-only or limited-write filesystems.

The record

An issue in FlowiseAI Inc Flowise v.1.6.2 and before allows a remote attacker to execute arbitrary code via a crafted script to the api/v1 component.

Affected packages

Ecosystem Package Introduced Fixed
npm flowise 0 1.8.1

Related vulnerabilities