漏洞信息 漏洞名称: GraphQL Directive Overloading Detection
漏洞类型: 配置问题
漏洞等级: 中危
漏洞描述: GraphQL是一种用于API的查询语言,也是一种用于现有数据执行查询的运行时。它允许客户端定义所需数据的结构,并且从服务器端返回完全相同的数据结构,从而使得API更加高效和强大。GraphQL广泛应用于现代Web和移动应用程序中,作为REST API的替代方案。本漏洞涉及GraphQL查询中的指令重载问题,通过在单个查询中允许重复的指令,可能导致服务拒绝(DoS)攻击。这种漏洞的技术根源在于GraphQL服务器未能正确限制或验证查询中的指令数量,使得攻击者可以通过构造包含大量重复指令的查询来消耗服务器资源,从而影响服务的可用性。这种漏洞的影响包括可能导致服务不可用,影响所有依赖该GraphQL服务的应用程序。攻击者无需认证即可利用此漏洞,且可以自动化执行攻击,增加了漏洞的潜在风险。
产品名称: GraphQL
来源: https://github.com/projectdiscovery/nuclei-templates/blob/2903691121f8a681761e8450e527fb49edf216d0/http%2Fmisconfiguration%2Fgraphql%2Fgraphql-directive-overloading.yaml
类型: projectdiscovery/nuclei-templates:github issues
POC详情 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 id: graphql-directive-overloadinginfo: name: GraphQL Directive Overloading Detection author: shamo0 severity: info description: | This template detects directive overloading in GraphQL queries, which can lead to denial of service by allowing multiple duplicated directives in a single query. tags: graphql,denial-of-servicehttp: - raw: - | POST /graphql HTTP/1.1 Host: {{Hostname}} Content-Type: application/json { "query" : "query { __typename @aa @aa @aa @aa @aa @aa @aa @aa @aa @aa }" } stop-at-first-match: true matchers-condition: or matchers: - type: regex part: body regex: - "\\ \" errors\\ \" :\\ s*\\ [.*?\\ ]" - type: regex part: body regex: - "\\ \" message\\ \" :\\ s*\\ \" .*?@aa.*?\\ \" " extractors: - type: regex name: directive_errors part: body regex: - "\\ \" errors\\ \" :\\ s*\\ [.*?\\ ]"