Flowise can run attacker code through the api/v1 component

HighSE Fix-First Score 43/100CVE-2024-31621SE-AIV-01616Remote code executionAI apps and chat interfacesMade public 30 Apr 2024

Download as PDF

What this means

An attacker can run any code they want on a server running Flowise. They could steal data, install malware, take down the service, or use the server to attack other systems. This affects any company using Flowise to build AI workflows.

SecurityElites Manager Brief: the decision in one minute

Flowise versions before 1.8.1 let attackers run code on your server. You need to upgrade immediately to stop this risk.

SecurityElites Fix-First Score43 of 100
Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity.
SecurityElites fix windowWithin 30 days
High severity. This is our suggestion from common practice; your own policy comes first.
Who should own the fixPlatform or DevOps team managing Flowise deployments.
Likely effortAbout 15 minutes: update the npm package to 1.8.1 and restart Flowise. It could take longer if you have many Flowise instances or need to test first.

Questions to ask your team or supplier

  • Do we have a list of all servers and containers running Flowise, and how often do we audit it?
  • What monitoring do we have on the api/v1 endpoint, and would we notice if an attacker ran code on it?
  • If an attacker used our Flowise instance, what keys, data, or systems could they access?

Message you can forward to the owning team

Security notice: Flowise can run attacker code through the api/v1 component (CVE-2024-31621)

Severity: High
SecurityElites Fix-First Score: 43 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to flowise 1.8.1 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/cve-2024-31621-flowise-can-run-attacker-code-through-the-api-v1-component/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01616

What is at stake in your AI setup

  • Keys for AI provider APIs (OpenAI, Anthropic, etc.): attacker could use them to make calls, draining your budget
  • Tools and systems connected to agents: attacker could use them to query databases or interact with other services
  • Prompts and workflow definitions: attacker could modify them to change AI behavior or extract sensitive data
  • Training and retrieval data: attacker could access or exfiltrate documents, embeddings, or other data used by your models

Map where your company uses AI

Who is exposed

  • Any team running Flowise versions before 1.8.1 on a network or the internet
  • AI workflow services that accept user input and pass it to Flowise
  • Development and staging instances if they are accessible to untrusted networks

Upgrades you need

SoftwareAffected versionsMove to
flowise
npm
Every version before 1.8.11.8.1 or later

Am I affected?

Enter the version you run. Nothing you type is stored.

SecurityElites Developer Brief: the technical picture

Is it being attackedWorking attack code is public, so expect attacks to follow
Where the attacker must beAnywhere that can reach it over a network, including the internet if it is exposed
Account neededAn ordinary user account
Does a person have to do somethingNo. It works without anyone clicking or opening anything
How hard it is to doEasy. It works reliably once the attacker can reach it
Risk of: data being readLimited
Risk of: data or settings being changedHigh
Risk of: the service being taken downLimited
Can attackers automate it at scaleNo, according to CISA. Each target needs manual work
How much control an attacker gainsTotal control of the affected software, according to CISA

Read from the official severity rating: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L

Kind of coding mistake

  • CWE-94: code can be injected

If you cannot upgrade today

  • Block all external traffic to the api/v1 endpoint using a firewall or reverse proxy until you can upgrade.
  • Restrict access to Flowise to only trusted internal IP addresses and VPN users.
  • Monitor Flowise logs closely for suspicious api/v1 requests and kill the process if you see signs of exploitation.

Signs it may already have been used against you

  • Flowise api/v1 endpoint receiving requests with script or code-like content, especially from untrusted IP addresses or at unusual times
  • Unexpected child processes spawned by the Flowise process (node or npm running shell commands)
  • Outbound network connections from the Flowise server to external hosts not in your whitelist
  • Errors or crashes in Flowise logs mentioning script execution or eval around the time of the incident

SecurityElites Fix Guide: step by step

  1. Find where Flowise is installedList all servers and containers running Flowise. Check your package managers, container registries, and deployment tools to see which ones are in use.
  2. Check the current Flowise versionOn each server or container, run npm list flowise or check the package.json file. Record the version number for each instance.
  3. Isolate affected instances if possibleIf you cannot upgrade immediately, block network access to the api/v1 endpoint using a firewall or reverse proxy. This reduces the risk while you plan the upgrade.
  4. Back up Flowise data and configurationSave the database, environment variables, and any saved workflows. This lets you roll back if the upgrade causes problems.
  5. Upgrade Flowise to version 1.8.1 or laterUpdate the npm package to version 1.8.1 or newer. Run npm install flowise@1.8.1 or update your package.json and reinstall dependencies.
  6. Restart FlowiseStop and start the Flowise service or redeploy the container. Wait for it to come online and confirm it is responding.
  7. Verify the fix is in placeRun npm list flowise on the upgraded instance and confirm the version is 1.8.1 or higher. Check that Flowise is responding normally.
  8. Review logs for signs of past abuseCheck Flowise and system logs from before the upgrade for unusual api/v1 requests or errors. Look for activity that does not match your normal workflows.

How to confirm it is fixed: Confirm that all Flowise instances are running version 1.8.1 or later by running npm list flowise on each server or container.

SecurityElites Quick Fixes: copy and paste

Upgrade flowise with npmupgrade

npm install flowise@1.8.1
npm ls flowise

Check installed Flowise versionfor this issue

npm list flowise

Run the service in a locked-down containergeneral hardening

docker run --read-only --cap-drop ALL \
  --security-opt no-new-privileges --user 1000:1000 \
  -p 127.0.0.1:8080:8080 YOUR_IMAGE

Test in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.

Let your AI coding assistant do the upgrade

Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.

Instruction for your coding assistant

You are helping me fix a security vulnerability (CVE-2024-31621) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n   - flowise (npm): must be 1.8.1 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.

SecurityElites Incident Drill: could your team handle this?

Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.

Which version of Flowise should we be running to fix this issue?A good answer: Flowise version 1.8.1 or later.
What is the main risk if we do not upgrade?A good answer: An attacker could run code on our server and access keys, data, or systems connected to Flowise.
What is the first thing we should do if we find we were running an old version?A good answer: Check the logs from before the upgrade for signs of unusual api/v1 requests or unexpected process activity.
What can we do right now to reduce the risk while we prepare to upgrade?A good answer: Block external access to the api/v1 endpoint using a firewall or reverse proxy.

Run a full timed drill with your team

Ticket for your backlog

Paste into Jira, GitHub Issues or any tracker that reads Markdown.

Ready-made ticket

## Flowise can run attacker code through the api/v1 component (CVE-2024-31621)

**Severity:** High  |  **SE Fix-First Score:** 43/100  |  **Fix window:** Within 30 days
**Record:** SE-AIV-01616 https://securityelites.com/ai-vulnerabilities/cve-2024-31621-flowise-can-run-attacker-code-through-the-api-v1-component/

### Why this matters
An attacker can run any code they want on a server running Flowise. They could steal data, install malware, take down the service, or use the server to attack other systems. This affects any company using Flowise to build AI workflows.

### What to do
1. Find where Flowise is installed
2. Check the current Flowise version
3. Isolate affected instances if possible
4. Back up Flowise data and configuration
5. Upgrade Flowise to version 1.8.1 or later
6. Restart Flowise
7. Verify the fix is in place
8. Review logs for signs of past abuse

Full steps: https://securityelites.com/ai-vulnerabilities/cve-2024-31621-flowise-can-run-attacker-code-through-the-api-v1-component/

### Done when
- [ ] flowise is at 1.8.1 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Confirm that all Flowise instances are running version 1.8.1 or later by running npm list flowise on each server or container.
- [ ] Logs were checked for signs of earlier use

SecurityElites Fix Tracker

Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.

Sign in to track this fix

Change history

  • 29 Apr 2024: Made public
  • 3 Dec 2026: Published

Official record

An issue in FlowiseAI Inc Flowise prior to v1.8.1 allows a remote attacker to execute arbitrary code via a crafted script to the api/v1 component.

Weakness type: CWE-94

Use this record in your own tools

Get this record as JSON

curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2024-31621

For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker

The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 3 Dec 2026. Read the vendor advisory before changing a production system.