Skip to content

fix: Missing security headers and clickjacking protection - #17

Open
MBK-fr wants to merge 1 commit into
masterfrom
darkmoon/fix-missing-security-headers-clickjacking
Open

MBK-fr wants to merge 1 commit into
masterfrom
darkmoon/fix-missing-security-headers-clickjacking

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_213c2c low Missing Security Headers - No CSP, X-Frame-Options, HSTS http://dvga.demo.invalid:5013/graphql
vuln_9be88b medium Missing Security Headers - No CSP, X-Frame-Options, HSTS / (all HTTP responses)
vuln_787c8e medium Clickjacking - Missing X-Frame-Options and CSP frame-ancestors / (all pages - /, /public_pastes, /create_paste, /solutions, /audit)
vuln_e02849 medium Missing Security Headers - No CSP, X-Content-Type-Options, HSTS, X-XSS-Protection All routes - /, /public_pastes, /create_paste, /graphql, /solutions, /audit

Fix

Adds an after_request hook setting Content-Security-Policy (incl. frame-ancestors 'none'), X-Frame-Options DENY, X-Content-Type-Options nosniff, Referrer-Policy, X-XSS-Protection 0 and HSTS on HTTPS.

Files changed:

  • 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_213c2c, vuln_9be88b, vuln_787c8e, vuln_e02849.

Adds an `after_request` hook setting Content-Security-Policy (incl. `frame-ancestors 'none'`), X-Frame-Options DENY, X-Content-Type-Options nosniff, Referrer-Policy, X-XSS-Protection 0 and HSTS on HTTPS.

Findings: vuln_213c2c, vuln_9be88b, vuln_787c8e, vuln_e02849
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