appsec.fyi

GraphQL — A Practical Guide

A curated AppSec resource library covering XSS, SQLi, SSRF, IDOR, RCE, XXE, OSINT, and more.

GraphQL: A Practical Guide

Curated and synthesized by . Last updated 2026-11-01. Synthesized from 117 of 117 curated resources. Browse all 117 GraphQL resources →

Problem Framing

GraphQL, while offering significant advantages in API design and development through its flexible querying capabilities, presents a unique and evolving attack surface for application security professionals. Its shift from multiple REST endpoints to a single, powerful endpoint, coupled with its schema-driven nature and the ability for clients to define complex, dynamic queries at runtime, introduces challenges that traditional security tooling often struggles to address effectively. This leads to a landscape where vulnerabilities can be subtle, widespread, and yield substantial impact, from data exfiltration and unauthorized access to denial of service and supply chain compromise. Understanding these risks is paramount for effective security posture management.

Core Mechanics

GraphQL's design allows clients to request specific data structures, rather than fixed responses from predefined endpoints. This flexibility is achieved through a schema that defines types, fields, and their relationships, and a query language that clients use to interact with this schema. Security concerns often arise from how this schema is exposed, how resolvers handle input and authorization, and how the server manages the execution of complex client-defined queries.

At its core, a GraphQL API exposes a single endpoint (commonly /graphql) that accepts queries, mutations, and subscriptions. Unlike REST, where different HTTP methods and paths denote different operations, GraphQL uses a single POST request (though GET can be supported for queries) with a JSON payload containing the operation definition. The power lies in the client's ability to precisely specify the shape and scope of the data it needs, leading to benefits like reduced over-fetching and under-fetching of data. However, this same power can be a significant security liability if not properly managed. [1][2][3]

Notable Techniques

The attack surface presented by GraphQL is multifaceted, encompassing vulnerabilities rooted in its fundamental design principles as well as common web application security flaws.

Introspection Abuse

GraphQL's introspection system is a powerful feature that allows clients to query the API schema for information about types, fields, queries, mutations, and their relationships. While invaluable for developers during development and for tooling, enabling introspection in production environments can be a significant security risk. Attackers can leverage this to gain a comprehensive understanding of the API's structure, identify sensitive data types, discover deprecated fields, and map out potential attack paths, effectively creating a blueprint for further exploitation. [4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20]

Injection Attacks

While GraphQL itself is a query language, the underlying resolvers that process these queries can be vulnerable to traditional injection attacks if input is not properly validated or sanitized. This includes:

Authorization and Access Control Flaws

GraphQL’s flexible querying model complicates the implementation of robust access control. Without proper validation at the resolver level, attackers can exploit various flaws:

Denial of Service (DoS) and Resource Exhaustion

The client's ability to define complex queries can be exploited to overwhelm server resources:

Supply Chain and Code Injection Risks

Vulnerabilities in GraphQL implementations can also have broader supply chain implications, as demonstrated by recent GitLab vulnerabilities.

Broken Authentication

GraphQL implementations are not immune to classic authentication bypass vulnerabilities. If authentication mechanisms are improperly implemented or bypassed, attackers can gain unauthorized access. [27][74][42][9]

Detection & Prevention

Mitigating GraphQL-specific vulnerabilities requires a combination of secure development practices, robust configuration, and continuous security testing.

Secure Development Practices

Configuration and Runtime Controls

Monitoring and Auditing

Tooling

A variety of tools are available to assist in discovering, analyzing, and exploiting GraphQL APIs:

Recent Developments

The GraphQL security landscape continues to evolve, with new vulnerabilities and attack techniques being discovered. Notable recent developments include:

Where to Go Deeper

For practitioners seeking to deepen their understanding and capabilities in GraphQL security, the following resources provide valuable insights and practical guidance:

Sources cited in this guide

  1. Common Attacks on REST APIs and GraphQL APIs — medium.com
  2. GraphQL API Vulnerabilities and Common Attacks — imperva.com
  3. GraphQL API Vulnerabilities, Common Attacks & Security Tips — vaadata.com
  4. OWASP WSTG: Testing GraphQL — owasp.org
  5. Abusing GraphQL Introspection: A Gateway for Recon and Exploitation — infosecwriteups.com
  6. GraphQL Security Testing: Introspection Abuse, Injection, and DoS — redteamworldwide.com
  7. GraphQL API Vulnerabilities - PortSwigger — portswigger.net
  8. Top GraphQL Security Vulnerabilities: Analyzing 1,500+ Endpoints — konghq.com
  9. GraphQL Security: 7 Common Vulnerabilities and Mitigations — tyk.io
  10. Hacking GraphQL Endpoints in Bug Bounty Programs | YesWeHack — yeswehack.com
  11. GraphQL | HackTricks — book.hacktricks.xyz
  12. Escape-Technologies/awesome-graphql-security: A curated list of awesome GraphQL Security frameworks, libraries, software and resources — github.com
  13. GraphQL introspection leads to sensitive data disclosure. — medium.com
  14. GraphQL Introspection leads to Sensitive Data Disclosure. — medium.com
  15. swisskyrepo/GraphQLmap: GraphQLmap is a scripting engine to interact with a — github.com
  16. br3akp0int/GQLParser: A repository for GraphQL Extension for Burp Suite — github.com
  17. doyensec/graph-ql: GraphQL Security Research Material — github.com
  18. GraphQL - HackTricks — book.hacktricks.wiki
  19. Slides: GraphQL Hacking — rashahacks.com
  20. Exploiting GraphQL — blog.assetnote.io
  21. Unauthenticated SQLi in a GraphQL API: From Guest to Admin Takeover — medium.com
  22. Discovering GraphQL endpoints and SQLi vulnerabilities — medium.com
  23. HackerOne Report #435066: SQL injection in GraphQL endpoint — hackerone.com
  24. Hacking (and Securing) GraphQL — blog.arcjet.com
  25. GraphQL Cheat Sheet | OWASP — cheatsheetseries.owasp.org
  26. GraphQL - Security Overview and Testing Tips · Doyensec's Blog — blog.doyensec.com
  27. What Is API Security? — paloaltonetworks.com
  28. GraphQL IDOR: How a Missing Org Check Let Me Edit Another Tenant’s Permissions — medium.com
  29. The Red Agent POV: Exploiting Broken Object-Level Authorization in an Airline GraphQL API — wiz.io
  30. The Red Agent POV: Exploiting Broken Object-Level Authorization in an Airline GraphQL API — wiz.io
  31. The 16-Hour Window: Catching a GraphQL Authorization Flaw — amannsharmaa.medium.com
  32. API Threat Research: GraphQL Authorization Flaws in a FinTech Platform — salt.security
  33. IDOR Vulnerability In GraphQL Api On inmobi.com — 1mirabbas.medium.com
  34. GraphQL IDOR leads to information disclosure (Eshan Singh) — medium.com
  35. Bug Bounty: BAC in GraphQL (10 Major Vulns - Cloverleaf) — medium.com
  36. GraphQL API Security Risks Every Developer Should Know — wiz.io
  37. Exploiting Broken Access Control on GraphQL — vaadata.com
  38. GraphQL Security: How I Found and Exploited Critical IDOR and Authorization Bypass — infosecwriteups.com
  39. GraphQL Security Testing Guide (2026) — levo.ai
  40. 👩‍💻Roadmap to Cybersecurity in 2022, Full-Read SSRF, IDOR in GraphQL, GCP Pentesting, and much… — infosecwriteups.com
  41. GraphQL IDOR leads to information disclosure - Eshan Singh - Medium — medium.com
  42. How a GraphQL Bug Resulted in Authentication Bypass — hackerone.com
  43. CVE-2025-31496: GraphQL Query Vulnerability in Apollo Compiler Leading to DoS — ameeba.com
  44. Exploiting GraphQL Query Depth — checkmarx.com
  45. Apollo Router Query Planner Excessive Resource Consumption via Named Fragment Expansion (CVE-2025-32034) — github.com
  46. 9 Ways To Secure your GraphQL API - Apollo Checklist — apollographql.com
  47. Securing GraphQL API endpoints using rate limits and depth limits (LogRocket) — blog.logrocket.com
  48. Cyclic Queries and Depth Limiting (Escape) — escape.tech
  49. Didn't Notice Your Rate Limiting: GraphQL Batching Attack — checkmarx.com
  50. Avoid GraphQL Denial-of-Service Attacks through Batching and Aliasing — escape.tech
  51. GraphQL Attacks and Vulnerabilities — beaglesecurity.com
  52. How GraphQL Mutation Aliasing Led to a $12,500 DoS Bug in HackerOne’s Account Recovery Flow — infosecwriteups.com
  53. GraphQL Security: 9 Best Practices to Protect Your API (Escape) — escape.tech
  54. Exploiting GraphQL for fun and bounties (BugBase) — bugbase.ai
  55. BatchQL: GraphQL Security Auditing for Batch Attacks — github.com
  56. InQL: Advanced GraphQL Security Testing Burp Extension — github.com
  57. Exploiting CSRF in GraphQL Applications — fdzdev.medium.com
  58. Exploiting GraphQL (Assetnote Research) — assetnote.io
  59. GraphQL API Security: Common Vulnerabilities and Exploits — medium.com
  60. https://blog.assetnote.io/2021/08/29/exploiting-graphql/ — blog.assetnote.io
  61. Active Exploitation Alert: Critical GitLab CVE-2026-19478 Code Injection Vulnerability Targets Unpatched Instances — rescana.com
  62. Critical GitLab vulnerability exploited days after disclosure — fieldeffect.com
  63. CVE-2026-19478: GitLab GraphQL Flaw Exploited — socradar.io
  64. GitLab Warns of Active Exploitation of Critical GraphQL Flaw — securityaffairs.com
  65. GitLab Warns of Active Exploitation of Critical GraphQL Flaw — securityaffairs.com
  66. GitLab CVE-2026-19478 Comes Under Active Exploitation Within Days of Disclosure — thehackernews.com
  67. GitLab Patches Critical CVE-2026-19478 GraphQL Vulnerability — esecurityplanet.com
  68. Critical and High-Severity GraphQL CVEs in GitLab: Code Injection and CSRF via One Directive — ox.security
  69. Critical GitLab flaw allows attackers to modify or delete public projects (CVE-2026-19478) — helpnetsecurity.com
  70. GitLab Patches Critical Code Injection Vulnerability — securityweek.com
  71. GitLab Patches Critical Unauthenticated GraphQL Vulnerability — securityaffairs.com
  72. CVE-2026-19478: Critical GitLab CE/EE GraphQL Vulnerability Enables Remote Deletion of Public Projects and User Data — rescana.com
  73. Critical GitLab GraphQL Flaw Could Let Unauthenticated Attackers Delete Public Projects — thehackernews.com
  74. Exploiting Broken Authentication Control in GraphQL — praetorian.com
  75. Prisma and PostgreSQL vulnerable to NoSQL injection? (Aikido) — aikido.dev
  76. Authorization in GraphQL (Apollo) — apollographql.com
  77. Apollo Authentication and Authorization Docs — apollographql.com
  78. GraphQL Introspection Security: Lessons from the Parse Server Vulnerability — escape.tech
  79. Exploiting GraphQL for Penetration Testing (Raxis) — raxis.com
  80. PayloadsAllTheThings — GraphQL Injection — github.com
  81. Enforcing GraphQL security best practices with GraphOS — apollographql.com
  82. CVE-2025-59845: CSRF Vulnerability in Apollo Studio Embeddable Explorer and Sandbox — ameeba.com
  83. GraphQL Discovery: Pentesting 101 Guide — escape.tech
  84. PayloadsAllTheThings - GraphQL Injection — github.com
  85. https://github.com/gsmith257-cyber/GraphCrawler — github.com
  86. Teycir/BurpAPISecuritySuite: Burp Suite extension for API security testing with 15 attack types, 108+ payloads, intelligent fuzzing, BOLA/IDOR detection, AI integration, and automated reconnaissance. Supports REST/GraphQL/SOAP APIs with Nuclei, Turbo Intruder, and external tool integration. OWASP API Top 10 coverage. — github.com
  87. doyensec/graph-ql: GraphQL Security Research Material — github.com
  88. GraphQLer: Context-Aware GraphQL API Fuzzing Tool — github.com
  89. ZeroThreat.ai Challenges Traditional DAST With Application-Aware Security Testing — issuewire.com
  90. TanStack npm Packages Hit by Mini Shai-Hulud — snyk.io
  91. Damn Vulnerable GraphQL Application — github.com
📚 This guide is synthesized from the full text of resources curated in the GraphQL library, and refreshed as new material is added.