Skip to content

fix: GraphQL batching amplification and missing depth limit - #12

Open
MBK-fr wants to merge 1 commit into
masterfrom
darkmoon/fix-graphql-batching-and-depth-limits
Open

MBK-fr wants to merge 1 commit into
masterfrom
darkmoon/fix-graphql-batching-and-depth-limits

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_02582e medium GraphQL Batch Query Execution - Query Batching via Array Syntax http://dvga.demo.invalid:5013/graphql
vuln_08b559 medium GraphQL Batch Query Support Enables Amplification Attacks /graphql (batch query)
vuln_bf7738 medium GraphQL Batch Query Abuse via Browser - Multiple Queries in Single Request /graphql (POST with JSON array body)
vuln_ad74a1 medium GraphQL Deep Nesting / Circular Query - No Depth Limiting http://dvga.demo.invalid:5013/graphql
vuln_dda36d medium GraphQL Query Depth Abuse - No Depth Limiting Causes Exponential Data Amplification /graphql (nested queries)

Fix

Disables array-based query batching on /graphql and enforces the depth limit (MAX_DEPTH) on every request, computed from the parsed operation AST with fragments expanded instead of counting whitespace-separated braces only in hard mode.

Files changed:

  • core/middleware.py
  • core/parser.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_02582e, vuln_08b559, vuln_bf7738, vuln_ad74a1, vuln_dda36d.

Disables array-based query batching on `/graphql` and enforces the depth limit (`MAX_DEPTH`) on every request, computed from the parsed operation AST with fragments expanded instead of counting whitespace-separated braces only in hard mode.

Findings: vuln_02582e, vuln_08b559, vuln_bf7738, vuln_ad74a1, vuln_dda36d
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