Skip to content

fix: Broken access control on pastes (IDOR, private pastes, subscriptions) - #7

Open
MBK-fr wants to merge 1 commit into
masterfrom
darkmoon/fix-paste-authorization-idor
Open

MBK-fr wants to merge 1 commit into
masterfrom
darkmoon/fix-paste-authorization-idor

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_25a900 high IDOR - Unauthorized Paste Modification via editPaste Mutation http://dvga.demo.invalid:5013/graphql
vuln_c6c687 high IDOR on editPaste - Unauthenticated Cross-User Data Modification /graphql (mutation editPaste)
vuln_733781 high IDOR on readAndBurn - Unauthenticated Paste Destruction http://dvga.demo.invalid:5013/graphql
vuln_37c99e high Private Pastes Accessible Without Authentication (Broken Access Control) http://dvga.demo.invalid:5013/graphql
vuln_8d68bb high Private Paste Data Exposed Without Authentication /graphql (query pastes(public: false))
vuln_7d3fc9 medium WebSocket Subscription Accessible Without Authentication - Real-Time Data Leak ws://host:5013/subscriptions
vuln_4610b8 high WebSocket Subscription Delivers Stored XSS Payloads in Real-Time ws://host:5013/subscriptions → subscribeToPastes() JavaScript function

Fix

Adds verified bearer-token authentication (core/auth.py) and paste ownership: editPaste, deletePaste and readAndBurn require the owner (or admin), private pastes are only listed/returned to their owner, new pastes are owned by the authenticated user, and the WebSocket subscription only broadcasts public pastes.

Files changed:

  • core/auth.py
  • core/views.py

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_25a900, vuln_c6c687, vuln_733781, vuln_37c99e, vuln_8d68bb, vuln_7d3fc9, vuln_4610b8.

…ions)

Adds verified bearer-token authentication (`core/auth.py`) and paste ownership: `editPaste`, `deletePaste` and `readAndBurn` require the owner (or admin), private pastes are only listed/returned to their owner, new pastes are owned by the authenticated user, and the WebSocket subscription only broadcasts public pastes.

Findings: vuln_25a900, vuln_c6c687, vuln_733781, vuln_37c99e, vuln_8d68bb, vuln_7d3fc9, 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