Summary
A stored cross-site scripting vulnerability in Wekan's HTML board export can cause card content to be interpreted as executable markup when the exported file is viewed.
A board member could place specially encoded content in a card title, and a recipient who clicks the card in the downloaded export may execute script that reads and transmits board data contained in that export.
Affected context
The issue occurs in Wekan's HTML export functionality when card titles and bodies are decoded as text and later interpolated into the exported document's innerHTML. Content that remains inert in the live board can become active after the export is generated and opened, particularly when recipients interact with exported cards. Data already present in the export may remain accessible even if the originating user later loses board membership.
Exploit preconditions
- Attack surface: Wekan's HTML board export and the generated local HTML document
- Required access: Board membership or another permission level that allows creating or editing card content
- Trigger point: A recipient opens the downloaded export and interacts with an affected card
- Why exploitation is possible: Untrusted card content is decoded and inserted as HTML, allowing browser parsing to reinterpret it as active markup
Why this happens
The vulnerability results from treating untrusted card content as an HTML template rather than as display text. Entity-decoded values were interpolated into innerHTML, so markup that was inert during normal board rendering could be reparsed in the exported document and execute in the recipient's browser.
This is CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), specifically a stored XSS pattern caused by unsafe DOM construction and insufficient output contextualization.
Potential impact
- Arbitrary script execution in a recipient's browser could occur
- Board data included in the HTML export could be read
- Exported content could be transmitted to an attacker-controlled destination
- Sensitive historical data could remain exposed after the attacker's membership is removed
- Recipients could be redirected, deceived, or subjected to additional browser-based attacks
General mitigation guidance
Mitigation generally focuses on keeping untrusted values in a text-only data path throughout export generation.
Common defensive patterns include:
- Constructing export interfaces with DOM nodes instead of concatenated HTML
- Assigning card titles and bodies through
textContentor equivalent safe text APIs - Applying context-appropriate output encoding when HTML generation is unavoidable
- Avoiding entity decoding before inserting values into HTML sinks
- Enforcing a restrictive Content Security Policy where compatible with the application
- Limiting exported data and applying least privilege to any services that generate or distribute exports
How teams detect issues like this
Organizations can look for this issue through:
- Static analysis rules identifying untrusted values concatenated into
innerHTML, HTML templates, or document fragments - Code review checks for entity decoding followed by HTML insertion
- Tests that place markup-like text in card fields and verify it remains inert in every export format
- Browser security testing of downloaded exports and interactive elements
- Policy enforcement that prefers safe DOM APIs such as
textContentfor user-controlled values - Automated security review tools that flag DOM-based and stored XSS data flows

