Repository navigation
Conversation
A public comment's website field was stored verbatim and rendered by the frontend directly into an anchor href. Because the component does not sanitize the URL, a javascript: value was stored XSS - executing (on click) in the blog origin, including in the admin moderation view, where the admin JWT lives in localStorage. Separately, the admin edit endpoint copied the raw comment text into the html column (rendered via innerHTML), bypassing the safe-mode Markdown that create() uses, so an admin text edit turned any HTML payload into live markup. Validate the website URL server-side (only http(s) or empty/relative; reject javascript:/data: and control-char-smuggled schemes) in both create and edit, and run the admin edit through the same safe-mode Parsedown pipeline instead of copying raw text into html.
splitbrain
added a commit
that referenced
this pull request
Nov 13, 2026
The website of a comment was stored as given and used as the link target of the author name. Anyone could post a comment with a javascript: URL as website. When the admin clicked the author name of such a comment, the script ran with the admin's access. The Disqus importer also stored websites from the export file without a check. Now only http and https URLs are stored, all other values are removed. Reported by Peter Wilfahrt (p-w) in #13
Owner
|
fixed a bit differently. thanks for reporting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security hardening for a privately reported issue. A credit for Peter Wilfahrt (p-w) would be appreciated if a fix is released, though it is by no means required.
GitHub: https://github.com/p-w Web: https://pw.is