Skip to content

fix: Stored XSS in paste rendering (title, content, user agent, subscriptions) - #16

Open
MBK-fr wants to merge 1 commit into
masterfrom
darkmoon/fix-stored-xss-paste-rendering
Open

MBK-fr wants to merge 1 commit into
masterfrom
darkmoon/fix-stored-xss-paste-rendering

Conversation

@MBK-fr

@MBK-fr MBK-fr commented Nov 21, 2026

Copy link
Copy Markdown

Findings

Darkmoon campaign camp_20261119_c80c95bf (DVGA demo target).

Finding Severity Title Endpoint
vuln_e1dbdb medium Stored XSS via createPaste Mutation http://dvga.demo.invalid:5013/graphql
vuln_2513ec high Stored XSS via createPaste Mutation - JavaScript Execution Confirmed /graphql (createPaste mutation) → /public_pastes
vuln_62dede high Stored XSS via Paste Title Field - JavaScript Execution in Card Header /graphql (createPaste mutation - title field) → /public_pastes
vuln_f843a5 medium Stored HTML Injection via Paste Title - Phishing Vector /graphql (createPaste mutation - title field) → /public_pastes
vuln_628170 high Stored XSS via User-Agent Header in Paste Display /graphql (createPaste mutation with custom User-Agent) → /public_pastes
vuln_8911c1 high Stored XSS Execution Confirmed via WebSocket Subscription DOM Injection http://dvga.demo.invalid:5013/public_pastes
vuln_4610b8 high WebSocket Subscription Delivers Stored XSS Payloads in Real-Time ws://host:5013/subscriptions → subscribeToPastes() JavaScript function

Fix

HTML-encodes every user-controlled paste field (title, content, owner, IP, User-Agent) before it is inserted into the DOM, both in the paste galleries and in the real-time WebSocket subscription handler.

Files changed:

  • templates/paste.html

Validation intent

Manual verification that the documented exploit path no longer succeeds, plus the project's existing test suite. Changed Python files pass python3 -m py_compile.

Opened for human review; never auto-merged.


Darkmoon finding reference: vuln_e1dbdb, vuln_2513ec, vuln_62dede, vuln_f843a5, vuln_628170, vuln_8911c1, vuln_4610b8.

…riptions)

HTML-encodes every user-controlled paste field (title, content, owner, IP, User-Agent) before it is inserted into the DOM, both in the paste galleries and in the real-time WebSocket subscription handler.

Findings: vuln_e1dbdb, vuln_2513ec, vuln_62dede, vuln_f843a5, vuln_628170, vuln_8911c1, vuln_4610b8
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.

1 participant