Skip to content

Fix reflected XSS in composer mygraph view#2908

Merged
deniszh merged 2 commits intomasterfrom
copilot/fix-issue-2794
Mar 17, 2026
Merged

Fix reflected XSS in composer mygraph view#2908
deniszh merged 2 commits intomasterfrom
copilot/fix-issue-2794

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

The /composer/mygraph endpoint reflected user-supplied action and graphName query parameters directly into HTTP responses without HTML escaping, enabling reflected XSS attacks:

/composer/mygraph?action="><script>alert(1)</script>&graphName=test
/composer/mygraph?action=delete&graphName="><script>alert(1)</script>

Changes

  • webapp/graphite/composer/views.py: Apply django.utils.html.escape() to action and graphName in all error response strings
  • webapp/tests/test_xss.py: Add ComposerMyGraphXSSTest with coverage for both vulnerable parameters

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: deniszh <1227222+deniszh@users.noreply.github.com>
Copilot AI changed the title [WIP] [2794] Fix issue with Graphite web functionality Fix reflected XSS in composer mygraph view Mar 17, 2026
Copilot AI requested a review from deniszh March 17, 2026 22:00
@deniszh deniszh marked this pull request as ready for review March 17, 2026 22:01
@deniszh deniszh merged commit 1e58262 into master Mar 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants