Impact
A DOM-based Cross-Site Scripting (XSS) vulnerability existed in the text editor feature. User input was directly injected into the DOM via innerHTML without sanitization, allowing attackers to inject and execute arbitrary JavaScript.
An attacker could craft malicious text content containing HTML/JavaScript (e.g., <script>alert(1)</script> or event handlers like <img onerror="...">) that would execute in the context of the preview iframe when rendered.
Severity: Medium - Attackers could execute arbitrary JavaScript in the victim's browser session within the editor context.
Patches
This vulnerability has been patched in commit 4dc2c0a305d384b6a016520d583514d73f224d50 (PR #3064).
The fix sanitizes user input by escaping HTML entities via textContent before DOM insertion, then safely converting newlines to <br> elements.
Users of the hosted Onlook service are automatically protected. Self-hosted users should pull the latest changes from the main branch.
Workarounds
There are no workarounds. Users must upgrade to a patched version.
References
Impact
A DOM-based Cross-Site Scripting (XSS) vulnerability existed in the text editor feature. User input was directly injected into the DOM via
innerHTMLwithout sanitization, allowing attackers to inject and execute arbitrary JavaScript.An attacker could craft malicious text content containing HTML/JavaScript (e.g.,
<script>alert(1)</script>or event handlers like<img onerror="...">) that would execute in the context of the preview iframe when rendered.Severity: Medium - Attackers could execute arbitrary JavaScript in the victim's browser session within the editor context.
Patches
This vulnerability has been patched in commit
4dc2c0a305d384b6a016520d583514d73f224d50(PR #3064).The fix sanitizes user input by escaping HTML entities via
textContentbefore DOM insertion, then safely converting newlines to<br>elements.Users of the hosted Onlook service are automatically protected. Self-hosted users should pull the latest changes from the main branch.
Workarounds
There are no workarounds. Users must upgrade to a patched version.
References