GHSA-34PM-923J-7WF8
Vulnerability from github – Published: 2026-08-18 16:31 – Updated: 2026-08-18 16:31Summary
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.
Affected version
Tested on Kestra 1.3.22.
Affected components
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.vue
The 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.
Proof of concept
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.
Actual result
The browser executes JavaScript from the Flow description. In the PoC, an alert is triggered showing the current domain.
Expected result
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.
Security impact
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.
Suggested remediation
The custom Markdown link plugin should not render arbitrary attributes into raw HTML.
Recommended fixes:
- Allowlist only the exact attributes required by the custom router link component.
- Reject all attributes beginning with
on, such asonclick,onmouseover, andonfocus. - Reject or sanitize dangerous attributes such as
style. - HTML-escape all attribute values before rendering.
- Ensure attributes are joined safely with spaces.
- Sanitize the final rendered Markdown output before passing it to
v-html. - Add regression tests for custom
[[link]]payloads containing event-handler attributes.
Minimal payload
[[link x="y" style="position:fixed;inset:0;z-index:9999;background:rgba(255,0,0,0.05)" onmouseover="alert(document.domain)"]]
Evidence collected
- The payload was stored in a Flow description.
- The Flow list displayed the malicious Flow.
- Opening the Flow description/info panel triggered JavaScript execution in the browser.
- The payload did not require execution of the Flow.
- The payload used Kestra’s custom
[[link]]syntax rather than raw HTML.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "io.kestra:kestra"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.24"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-55839"
],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-08-18T16:31:38Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\n\nKestra\u2019s 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.\n\nAs 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\u2019s browser.\n\nThis is not a normal raw-HTML Markdown payload such as `\u003cimg onerror=...\u003e`. The payload uses Kestra\u2019s custom `[[link]]` Markdown syntax, and the dangerous HTML attributes are introduced by Kestra\u2019s own Markdown plugin.\n\n## Affected version\n\nTested on Kestra `1.3.22`.\n\n## Affected components\n\nSource review identified the issue in the custom Markdown link renderer:\n\n* `ui/src/utils/markdown_plugins/link.ts`\n* `ui/src/utils/markdown.ts`\n* `ui/src/components/layout/Markdown.vue`\n\nThe vulnerable code path renders parsed attributes directly into an HTML string:\n\n```ts\nconst attrs = token.attrs\n ? token.attrs.map(([name, value]) =\u003e `${name}=\"${value}\"`).join(\"\")\n : \"\";\n\nreturn `\u003crouter-md ${attrs}\u003e`;\n```\n\nThe implementation does not safely restrict attribute names or values before inserting the generated HTML into the DOM.\n\n## Proof of concept\n\nCreate or edit a Flow with the following YAML:\n\n```yaml\nid: markdown_xss_flow_desc\nnamespace: company.team\ndescription: |\n [[link x=\"y\" style=\"position:fixed;inset:0;z-index:9999;background:rgba(255,0,0,0.05)\" onmouseover=\"alert(document.domain)\"]]\n\ntasks:\n - id: hello\n type: io.kestra.plugin.core.log.Log\n message: hello\n```\n\nSave the Flow.\n\nThen navigate to the Flow list:\n\n```text\nhttp://localhost:8080/ui/main/flows\n```\n\nClick the description/info icon next to the malicious Flow.\n\n## Actual result\n\nThe browser executes JavaScript from the Flow description. In the PoC, an alert is triggered showing the current domain.\n\n## Expected result\n\nMarkdown-rendered Flow descriptions should not be able to inject arbitrary JavaScript event handlers or attacker-controlled HTML attributes into the page.\n\nThe custom `[[link]]` syntax should only generate safe attributes required for the intended router-link behavior.\n\n## Security impact\n\nAn 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\u2019s browser.\n\nDepending on the victim\u2019s 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.\n\nThis crosses a security boundary in multi-user Kestra deployments where Flow authors are less privileged than administrators or other operators who review workflows.\n\n## Suggested remediation\n\nThe custom Markdown link plugin should not render arbitrary attributes into raw HTML.\n\nRecommended fixes:\n\n1. Allowlist only the exact attributes required by the custom router link component.\n2. Reject all attributes beginning with `on`, such as `onclick`, `onmouseover`, and `onfocus`.\n3. Reject or sanitize dangerous attributes such as `style`.\n4. HTML-escape all attribute values before rendering.\n5. Ensure attributes are joined safely with spaces.\n6. Sanitize the final rendered Markdown output before passing it to `v-html`.\n7. Add regression tests for custom `[[link]]` payloads containing event-handler attributes.\n\n## Minimal payload\n\n```md\n[[link x=\"y\" style=\"position:fixed;inset:0;z-index:9999;background:rgba(255,0,0,0.05)\" onmouseover=\"alert(document.domain)\"]]\n```\n\n## Evidence collected\n\n* The payload was stored in a Flow description.\n* The Flow list displayed the malicious Flow.\n* Opening the Flow description/info panel triggered JavaScript execution in the browser.\n* The payload did not require execution of the Flow.\n* The payload used Kestra\u2019s custom `[[link]]` syntax rather than raw HTML.",
"id": "GHSA-34pm-923j-7wf8",
"modified": "2026-08-18T16:31:38Z",
"published": "2026-08-18T16:31:38Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/kestra-io/kestra/security/advisories/GHSA-34pm-923j-7wf8"
},
{
"type": "WEB",
"url": "https://github.com/kestra-io/kestra/commit/6c8e6d099ed172cbb6b003b7fb30b7bb1f8f710e"
},
{
"type": "PACKAGE",
"url": "https://github.com/kestra-io/kestra"
},
{
"type": "WEB",
"url": "https://github.com/kestra-io/kestra/releases/tag/v1.3.24"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Kestra vulnerable to stored XSS via custom Markdown [[link]] attribute injection"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.