CVE-2026-5026
Received Received - Intake
Stored XSS via Unsanitized SVG Upload in /api/v1/files/images Endpoint

Publication date: 2026-03-27

Last updated on: 2026-04-20

Assigner: Tenable Network Security, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-27
Last Modified
2026-04-20
Generated
2026-05-07
AI Q&A
2026-03-27
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
langflow langflow *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-5026 is a stored cross-site scripting (XSS) vulnerability in the Langflow application. It occurs because the '/api/v1/files/images/{flow_id}/{file_name}' endpoint serves SVG files with the content type 'image/svg+xml' without sanitizing their content.

Since SVG files can contain embedded JavaScript, an attacker can upload a malicious SVG file that executes arbitrary JavaScript code when viewed by other users.

This allows the attacker to perform stored XSS attacks, potentially stealing authentication tokens stored in cookies, including JSON Web Tokens (JWT) for access and refresh tokens.


How can this vulnerability impact me? :

This vulnerability can have serious security impacts because it allows attackers to execute arbitrary JavaScript in the context of other users' browsers.

  • Attackers can steal authentication tokens stored in cookies, such as JWT access and refresh tokens.
  • With stolen tokens, attackers can impersonate legitimate users, gaining unauthorized access to sensitive data or functionality.
  • This can lead to account takeover, data breaches, and further exploitation within the affected system.

How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by identifying if the '/api/v1/files/images/{flow_id}/{file_name}' endpoint is serving SVG files with the content type 'image/svg+xml' without sanitizing their content. Monitoring for uploads or presence of SVG files that contain embedded JavaScript is key.

You can use network monitoring tools or web application scanners to detect SVG files being served from this endpoint. Additionally, inspecting the content of SVG files for embedded <script> tags or JavaScript event handlers can help identify malicious files.

  • Use curl or wget to fetch SVG files from the endpoint and inspect their content, for example: curl -s https://yourserver/api/v1/files/images/{flow_id}/{file_name} | grep -i '<script>'
  • Use a web application scanner that supports XSS detection to scan the endpoint for stored XSS vulnerabilities.
  • Monitor logs for unusual SVG file uploads or access patterns to the '/api/v1/files/images/' endpoint.

What immediate steps should I take to mitigate this vulnerability?

Since no known patch or solution is available at this time, immediate mitigation steps focus on limiting the risk of exploitation.

  • Restrict or disable SVG file uploads to the vulnerable endpoint if possible.
  • Implement server-side sanitization or validation to remove or neutralize any embedded JavaScript in SVG files before serving them.
  • Apply Content Security Policy (CSP) headers to restrict execution of inline scripts and reduce the impact of XSS attacks.
  • Monitor and audit access to the '/api/v1/files/images/' endpoint for suspicious activity.
  • Educate users to be cautious when viewing SVG files served by the application.

How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability allows attackers to execute arbitrary JavaScript via stored cross-site scripting (XSS) by uploading malicious SVG files. This can lead to the theft of authentication tokens, including JWT access and refresh tokens, which are sensitive security credentials.

Such unauthorized access and potential data breaches could impact compliance with common standards and regulations like GDPR and HIPAA, which require protection of personal data and secure authentication mechanisms.

However, the provided information does not explicitly discuss the direct effects on compliance with these standards.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart