NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Flowise

CVE-2024-31621: Flowise vulnerable to code injection via api/v1

highCVSS 4.0 7.2 · 3.1 7.6GHSA-6wp6-22x5-rr3w

Flowise before 1.8.1 lets a remote attacker run arbitrary code through the api/v1 component with a crafted script. The linked fix commit changes how the server's authentication middleware matches /api/v1/ paths. Upgrade to flowise 1.8.1.

Published Apr 29, 2024 · Updated Aug 2, 2024 · Analysis Nov 2, 2026

What an attacker can do

The advisory is brief: a remote attacker can execute code by sending a crafted script to the api/v1 component. The CVSS vector lists low privileges, so an account or an API key may be needed, and the impact is mostly on integrity.

The fix commit, titled as a regex check for the auth middleware, shows the mechanism that matters. In packages/server/src/index.ts the middleware tested the request URL with req.url.includes('/api/v1/') and the whitelist with req.url.includes(url). The fix replaces both with case-insensitive regular expressions. That points to a path-matching gap: a request whose path differs from the exact string, for example in letter case, could escape the authentication check on the /api/v1/ routes. This reading comes from the diff, not from the advisory text.

Flowise exposes nodes that run JavaScript and tools that reach files and the network. An attacker who gets through to those routes can run code as the Flowise process, which holds the stored credentials for model providers and connected databases. A public exploit is listed in the references, and the EPSS score is high at about 61 percent.

Who is affected

The npm package flowise before 1.8.1. Any Flowise server reachable by an attacker is in scope, with the most risk where the instance is exposed to the internet. Check:

npm ls flowise

For Docker, check the image tag.

flowise

Ecosystem
npm
Affected
< 1.8.1
Fixed in
1.8.1
Check
npm ls flowise

How to fix it

Upgrade to flowise 1.8.1.

npm install -g [email protected]

The fix commit makes the /api/v1/ check and the auth whitelist use case-insensitive regex matching, and the request logger skips the credentials icon route. The sources give no workaround. Until you upgrade, do not expose Flowise to the internet, put it behind a reverse proxy with its own authentication, and rotate stored credentials if you suspect abuse.

How to tell if you were hit

Look in reverse-proxy and Flowise logs for requests to api/v1 routes with unusual casing, or without the expected credentials but with a 200 response. Check chatflows and custom tool or function nodes for scripts you did not write. On the host, look for child processes of the Node process, new files and outbound connections. A public exploit exists (Exploit-DB 52001), so also search for its traffic pattern in your logs.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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.

Questions

What does CVE-2024-31621 let an attacker do?

Execute arbitrary code through a crafted script sent to the api/v1 component, per the advisory. The fix commit changes the auth middleware's path matching.

Is there a public exploit?

Yes. The references list Exploit-DB 52001. No source in the entry says it is used in attacks, and it is not in CISA's KEV catalog.

Which version fixes it?

flowise 1.8.1. Every version before that is listed as affected.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Flowise vulnerabilities

All Flowise entries