OSV 1.4.0 · github-reviewed · 修改于 2026-08-19 00:31
发布时间
2026-08-19 00:31
GitHub 审查时间
2026-08-19 00:31
NVD 发布时间
—
源文件
advisories/github-reviewed/2026/08/GHSA-34pm-923j-7wf8/GHSA-34pm-923j-7wf8.json
Kestra’s Markdown renderer supports a custom [[link ...]] syntax that is converted into a custom HTML element. The custom Markdown parser allows attacker-controlled attributes to be rendered into the generated element without proper allowlisting or sanitization.
As a result, a user who can create or edit Markdown-rendered content, such as a Flow description, can inject JavaScript event-handler attributes. When another user views or interacts with the affected Markdown-rendered UI element, the JavaScript executes in that user’s browser.
This is not a normal raw-HTML Markdown payload such as <img onerror=...>. The payload uses Kestra’s custom [[link]] Markdown syntax, and the dangerous HTML attributes are introduced by Kestra’s own Markdown plugin.
Tested on Kestra 1.3.22.
Source review identified the issue in the custom Markdown link renderer:
ui/src/utils/markdown_plugins/link.tsui/src/utils/markdown.tsui/src/components/layout/Markdown.vueThe vulnerable code path renders parsed attributes directly into an HTML string:
const attrs = token.attrs
? token.attrs.map(([name, value]) => `${name}="${value}"`).join("")
: "";
return `<router-md ${attrs}>`;
The implementation does not safely restrict attribute names or values before inserting the generated HTML into the DOM.
Create or edit a Flow with the following YAML:
id: markdown_xss_flow_desc
namespace: company.team
description: |
[[link x="y" style="position:fixed;inset:0;z-index:9999;background:rgba(255,0,0,0.05)" onmouseover="alert(document.domain)"]]
tasks:
- id: hello
type: io.kestra.plugin.core.log.Log
message: hello
Save the Flow.
Then navigate to the Flow list:
http://localhost:8080/ui/main/flows
Click the description/info icon next to the malicious Flow.
The browser executes JavaScript from the Flow description. In the PoC, an alert is triggered showing the current domain.
Markdown-rendered Flow descriptions should not be able to inject arbitrary JavaScript event handlers or attacker-controlled HTML attributes into the page.
The custom [[link]] syntax should only generate safe attributes required for the intended router-link behavior.
An attacker with permission to create or update a Flow in a namespace can store a malicious Markdown payload in the Flow description. When another Kestra user views the Flow list and opens the Flow description/info panel, attacker-controlled JavaScript executes in the victim’s browser.
Depending on the victim’s privileges, this may allow the attacker to perform actions as the victim within the Kestra UI, access data visible to the victim, or pivot into more privileged namespace or administrative functionality.
This crosses a security boundary in multi-user Kestra deployments where Flow authors are less privileged than administrators or other operators who review workflows.
The custom Markdown link plugin should not render arbitrary attributes into raw HTML.
Recommended fixes:
on, such as onclick, onmouseover, and onfocus.style.v-html.[[link]] payloads containing event-handler attributes.[[link x="y" style="position:fixed;inset:0;z-index:9999;background:rgba(255,0,0,0.05)" onmouseover="alert(document.domain)"]]
[[link]] syntax rather than raw HTML.