Repository navigation
security: sanitize milestone names in new issue form - #8325
Merged
Merged
Conversation
The new issue page's milestone dropdown rendered milestone names through Go's default auto-escaping only. Semantic UI's dropdown re-parses the decoded text as HTML when an item is selected, which allowed a stored XSS via crafted milestone names. Apply the same Sanitize filter that view_content.tmpl already uses. Refs: GHSA-vcm5-gvmp-78mp
unknwon
added a commit
that referenced
this pull request
Jun 7, 2026
(cherry picked from commit 573eacd)
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.
Summary
Apply the existing
| Sanitizefilter to milestone name renderings intemplates/repo/issue/new_form.tmpl, matching the patches already in place inview_content.tmpl. Without it, the new issue page's milestone dropdown is vulnerable to stored XSS because the Semantic UI dropdown re-parses decoded text as HTML on selection.Refs: GHSA-vcm5-gvmp-78mp
Test plan
moon run gogs:lintmoon run gogs:build<img src=x onerror=alert(1)>, open the new issue page, and confirm the dropdown no longer executes the payload on selection.