Skip to content

fix: JWT signature verification disabled (alg:none accepted) - #6

Open
MBK-fr wants to merge 1 commit into
masterfrom
darkmoon/fix-jwt-signature-verification
Open

MBK-fr wants to merge 1 commit into
masterfrom
darkmoon/fix-jwt-signature-verification

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_170a32 critical JWT Signature Verification Disabled - Forged Token Accepted (alg:none) http://dvga.demo.invalid:5013/graphql
vuln_9a9585 critical JWT Algorithm None Bypass - Admin Authentication Bypass via Forged Token /graphql (query me with forged JWT)
vuln_95ee01 high JWT Authentication Returns Plaintext Password via me(token) Query http://dvga.demo.invalid:5013/graphql

Fix

The me(token:) resolver decoded tokens with verify_signature=False. Tokens are now verified with the server key, the algorithm is pinned to HS256 (alg:none and key confusion rejected), exp is enforced and only access tokens are accepted; the hard-coded dvga signing keys are replaced by environment-provided or random keys.

Files changed:

  • app.py
  • core/helpers.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_170a32, vuln_9a9585, vuln_95ee01.

The `me(token:)` resolver decoded tokens with `verify_signature=False`. Tokens are now verified with the server key, the algorithm is pinned to HS256 (alg:none and key confusion rejected), `exp` is enforced and only access tokens are accepted; the hard-coded `dvga` signing keys are replaced by environment-provided or random keys.

Findings: vuln_170a32, vuln_9a9585, vuln_95ee01
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