CVE-2026-5026

Langflow - Stored XSS via Malicious SVG Upload

Published Mar 27, 2026 CVSS 4.0 · 7 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability lies in an API endpoint that serves SVG files without sanitization. Malicious SVGs can embed JavaScript that executes when opened by other users, allowing an attacker to run code in the victim’s browser and exfiltrate cookies such as JWT tokens. This leads to unauthorized access and session hijacking.

Affected Systems

The flaw affects the Langflow AI platform (langflow). The CVE does not specify any particular version, so all deployments may be susceptible unless a future patch is applied.

Risk and Exploitability

A CVSS score of 7 indicates high severity. Although EPSS data is missing and the vulnerability is not listed in CISA’s KEV catalog, the stored nature and ability to inject JavaScript make exploitation likely against users who view uploaded content. The attack would require an attacker to upload a malicious SVG via the public endpoint, after which any user who views the file triggers the payload. The absence of an official fix means current risk remains high until a remediation is deployed.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a patched version as soon as it is released
  • Validate MIME types and file extensions to block SVG uploads if not required
  • Sanitize or strip scripts from SVG files before storage
  • Implement a strict Content Security Policy that disallows inline scripts from SVG resources
  • Monitor upload activity and alert on suspicious file names or traffic to the file endpoint

Generated by OpenCVE AI on March 27, 2026 at 16:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:langflow:langflow:-:*:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}

Type Values Removed Values Added
First Time appeared Langflow
Langflow langflow
Vendors & Products Langflow
Langflow langflow
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Langflow - Stored XSS via Malicious SVG Upload
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 7, 'vector': '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'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
tenable
Published
Updated
Mar 27, 2026, 3:35 PM
Reserved
Mar 27, 2026, 2:43 PM
Status
Analyzed
Published
Mar 27, 2026, 3:17 PM
Modified
Jun 17, 2026, 10:58 AM