CVE-2025-71331: Flowise XSS Vulnerability in Chat Messages and Agent Functions
Flowise, a platform for building AI chat applications, has a cross-site scripting (XSS) weakness in versions before 3.0.8. An attacker can inject malicious code through chat messages or custom agent functions, which then runs in a victim's browser when they interact with an affected Flowise instance. This could allow theft of session cookies and authentication tokens, potentially giving attackers unauthorized access to user accounts or sensitive data the victim can access.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.1 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Weaknesses (CWE)
- CWE-80
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-20 / 2026-06-23
NVD description (verbatim)
Flowise before 3.0.8 contains a cross-site scripting (XSS) vulnerability caused by insufficient input filtering in chat messages and custom agent functions. An attacker can inject malicious JavaScript by sending an iframe payload (e.g., <iframe src="javascript:alert(document.cookie)">) in a chat box, or by having a custom agent function return an XSS payload from an external website. The injected script executes in the victim's browser, enabling theft of cookies and session data.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2025-71331 is a stored/reflected XSS vulnerability (CWE-80) affecting Flowise chat and custom agent function handling. The vulnerability stems from insufficient input validation and output encoding. Attackers can craft payloads such as iframe elements with JavaScript handlers or supply malicious content from external sources through agent function returns. When a user views the chat or agent response, the unfiltered payload executes in the browser context, bypassing same-origin protections via the CCSS:C parameter. The CVSS 3.1 score of 6.1 reflects network accessibility, low attack complexity, no privilege requirements, but limited impact scope to confidentiality and integrity without denial of service.
Business impact
Organizations running Flowise-based chat applications face credential compromise risk and data exfiltration. If users interact with chat instances containing injected payloads, attackers gain access to session tokens, authentication cookies, and potentially personal information displayed in the chat interface or accessible via the user's browser session. For SaaS deployments or enterprises using Flowise internally, this enables account takeover and lateral movement. Customer-facing deployments risk reputation damage and regulatory exposure if user data is stolen. The medium CVSS score should not understate the practical impact: XSS targeting authentication credentials is frequently weaponized.
Affected systems
Flowise versions prior to 3.0.8 are affected. The vulnerability is present in the chat message input handler and custom agent function output processor. Any deployment or instance running unpatched Flowise—whether self-hosted, containerized, or integrated into a larger platform—is vulnerable if it accepts user input or fetches content from external sources via agent functions.
Exploitability
Exploitation requires user interaction (phishing, social engineering, or direct platform access) but no authentication or special privileges. An attacker sends a malicious chat message or configures a custom agent to return an XSS payload. The barrier to exploitation is low: simple iframe or script injection syntax works. Public disclosure increases risk; we do not track active KEV status at this time, but the simplicity of payload construction suggests rapid weaponization is possible if not already occurring.
Remediation
Upgrade Flowise to version 3.0.8 or later immediately. Verify the upgrade includes input sanitization and output encoding fixes for both chat message processing and custom agent function returns. Organizations unable to upgrade immediately should restrict Flowise to authenticated internal users only and disable custom agent functions that fetch external content until patching is complete.
Patch guidance
Flowise maintainers recommend upgrading to 3.0.8 or later. Review your current version via the Flowise admin interface or version command. For containerized deployments, update the container image tag and redeploy. For npm-based installations, run 'npm install flowise@latest' (or a specific patched version). Test in a staging environment before production rollout. Verify that chat and agent functions no longer render unencoded HTML or execute injected scripts post-upgrade. If you maintain custom agent functions, audit them for external content fetching and implement server-side sanitization as defense-in-depth.
Detection guidance
Monitor Flowise application logs for chat messages or agent function outputs containing suspicious payloads (iframe, script, event handlers, javascript: protocols). Implement Content Security Policy (CSP) headers at the Flowise application level to restrict script execution. Use browser developer tools or network inspection to verify that responses from Flowise API endpoints are properly encoded (HTML entities, not raw HTML). Conduct user awareness training: educate users not to click or copy-paste links from untrusted chat sources. Consider WAF rules to block common XSS patterns in request bodies sent to Flowise endpoints.
Why prioritize this
Although CVSS 6.1 is medium severity, XSS vulnerabilities targeting authentication credentials warrant rapid patching in any customer-facing or internal collaboration tool. Flowise often processes sensitive conversational data and user interactions; compromised sessions leak that context. The low exploitation barrier and user-interaction requirement make this a social engineering vector. Prioritize patching within 1–2 weeks, especially if Flowise is exposed to external users or processes PII.
Risk score, explained
CVSS 3.1 score of 6.1 reflects: network-accessible attack surface (AV:N), no special attack conditions (AC:L), no authentication required (PR:N), and user interaction necessary (UI:R). Impact is limited to confidentiality and integrity (C:L/I:L) with no availability impact (A:N). Scope is changed (S:C), meaning the vulnerability can affect resources beyond the vulnerable component. The score does not fully capture business risk of session hijacking or the likelihood of social engineering exploitation; it serves as a baseline for technical triage, not business priority.
Frequently asked questions
Can the attacker steal my Flowise admin credentials via this XSS?
Yes, if an admin views a chat containing an XSS payload, their session cookie or authentication token can be exfiltrated. This would grant an attacker full access to the Flowise platform, including all chat histories, custom agents, and configurations. Admins should patch immediately and change passwords after patching.
Does upgrading to 3.0.8 automatically clean up old malicious chat messages?
Upgrading prevents new payloads from executing, but stored chat messages containing previous XSS payloads remain in the database. Audit your chat history for suspicious messages and delete them manually. Set up a maintenance window to review stored chats for injected content, or export and re-import sanitized chat backups if your deployment allows it.
If I run Flowise behind a Web Application Firewall (WAF), am I protected?
A WAF can block many common XSS patterns in incoming requests, reducing but not eliminating risk. However, XSS payloads can be obfuscated or encoded, and agent functions may fetch external content that bypasses WAF inspection. A WAF is a helpful defensive layer but not a substitute for patching. Combine WAF rules with Content Security Policy headers and the patch for defense-in-depth.
Are custom agent functions that call external APIs particularly risky with this vulnerability?
Yes. If a custom agent function fetches and returns content from an untrusted or compromised external source without sanitizing it, that content becomes an XSS vector. Review all custom agents that call third-party APIs; sanitize their outputs or isolate them to authenticated-only chat instances until patching is complete.
This analysis is provided for informational purposes and reflects publicly disclosed vulnerability details as of the publication date. SEC.co does not guarantee the completeness or real-time accuracy of this information. Vendors may release updated patches, advisories, or corrections that supersede this document. Organizations should verify patch availability and compatibility with their specific Flowise version and deployment architecture before applying updates. Consult official Flowise security advisories and release notes for authoritative guidance. This document does not constitute professional security advice; engage qualified security professionals for risk assessment and remediation planning specific to your environment. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2025-62198MEDIUMApache Atlas XSS Vulnerability – Exploitation, Patch & Detection
- CVE-2026-34033MEDIUMApache Answer XSS in Notification Emails – Vulnerability Explainer
- CVE-2026-11511LOWBolt CMS HTML Injection Vulnerability – Unsupported Software Risk
- CVE-2026-12812LOWRadware Cyber Controller HTML Injection Vulnerability – Patch Guidance
- CVE-2026-46492HIGHXSS in md-fileserver Markdown Rendering
- CVE-2026-50146HIGHAstro XSS Vulnerability in Client Directives – Patch to 6.3.3
- CVE-2026-42862MEDIUMFlowise Mass Assignment Vulnerability Breaks Workspace Isolation
- CVE-2026-46443MEDIUMFlowise Credential Exposure via Unfiltered API Response