Summary
Kestra versions up to and including 1.3.3 contain a stored cross-site scripting (XSS) vulnerability in how flow YAML metadata fields are rendered as HTML in the web UI.
By crafting malicious Markdown content in fields such as description, inputs[].displayName, or inputs[].description, a flow author can cause arbitrary JavaScript to execute in the browser of any user who views or interacts with the affected flow, including in some zero-click scenarios.
Affected context
This issue affects Kestra's web-based UI where flow definitions are viewed or edited and their inputs are displayed.
It specifically arises when:
- Flow YAML metadata fields (
description,inputs[].displayName,inputs[].description) are supplied by users with flow-authoring permissions, and - These fields are rendered using the
Markdown.vuecomponent withhtml: true, and - The resulting HTML is injected into the DOM via Vue's
v-htmldirective without sanitization.
The vulnerability is present in Kestra deployments running versions up to and including 1.3.3 and is triggered when other users browse or interact with flows containing malicious metadata.
Exploit preconditions
- Attack surface: Kestra web UI (browser-based interface for viewing and managing flows).
- Required access: Ability to create or modify flows, or otherwise influence the YAML metadata fields
description,inputs[].displayName, orinputs[].description. - Trigger point: Rendering of a flow in the UI, including:
- Viewing a flow's details or documentation (for descriptions), or
- Viewing or interacting with flow inputs (for
displayNameand input descriptions).
Some cases, such as malicious inputs[].displayName, may execute with effectively zero additional user interaction once the relevant screen loads.
- Why exploitation is possible: The Markdown rendering is configured with
html: true, which preserves embedded HTML, and the resulting HTML is bound into the DOM viav-htmlwithout sanitization or content security restrictions. This allows attacker-supplied HTML/JavaScript to execute in the context of the Kestra web application.
Why this happens
The root cause aligns with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).
User-controlled metadata fields from flow YAML definitions are treated as trusted content and rendered via a Markdown component that allows raw HTML (html: true).
The component's output is then injected into the DOM using Vue's v-html directive, which directly inserts HTML without escaping or sanitization.
Because no server-side or client-side sanitization is applied to these metadata fields, an attacker can supply HTML/JavaScript payloads that execute in any user's browser when the affected flow or its inputs are displayed.
Potential impact
- Theft of user session information or other sensitive data accessible via the Kestra UI.
- Impersonation of users via DOM manipulation or UI redressing to trick them into performing unwanted actions.
- Execution of arbitrary API requests on behalf of the victim within the context of their authenticated session (e.g., modifying flows, accessing execution data).
- Installation of persistent, malicious JavaScript that runs whenever specific flows or views are loaded.
- Lateral movement within the application by targeting administrators or highly privileged operators viewing compromised flows.
General mitigation guidance
Effective mitigation generally focuses on treating all user-supplied, rich-text metadata as untrusted and enforcing strict separation between data and executable content:
- Avoid rendering untrusted Markdown with
html: truein security-sensitive contexts; disable raw HTML support or restrict the subset of allowed tags. - Apply robust HTML sanitization on the server or client side before binding user-generated content to
v-htmlor equivalent mechanisms. - Favor components or libraries that provide built-in XSS-safe rendering, auto-escaping, or a safe whitelist of formatting elements.
- Enforce principle of least privilege for flow authors, limiting who can create or modify flows that influence shared UI views.
- Consider adopting Content Security Policy (CSP) configurations that reduce the impact of XSS (e.g., disallowing inline scripts and restricting script sources), while recognizing CSP is a defense-in-depth measure and not a sole fix.
How teams detect issues like this
Organizations can approach detection of this pattern and similar issues through:
- Static analysis: Rules that flag usage of
v-html(or equivalent dynamic HTML injection APIs) when the source is user-controlled or passes through Markdown rendering withhtml: true. - Code review: Security-focused review checklists that call out any use of raw HTML rendering paths, Markdown components with HTML enabled, or absence of sanitization before DOM insertion.
- Configuration and policy enforcement: Development guidelines or linting rules that prohibit dangerous rendering options (e.g.,
html: truein Markdown) unless paired with a documented sanitization step. - Dynamic testing: Automated UI tests or security scanning tools that inject benign XSS test payloads into flow metadata fields and observe whether they are reflected as executable script in the UI.

