Directive overloading
Description
Directive Overloading occurs when a user can send a query with many consecutive directives and overload the engine handling those directives.
Remediation
Limit the number of directives allowed in a query. This should be handled by the GraphQL engine while parsing the document, otherwise this can lead to a heap overflow.
GraphQL Specific
Apollo
Yoga
Awsappsync
Graphqlgo
Graphqlruby
Hasura
Configuration
Identifier:
resource_limitation/graphql_directive_overload
Options
- threshold : Maximum number of directives allowed before raising an alert in the fast check.
Examples
Ignore this check
checks:
resource_limitation/graphql_directive_overload:
skip: true
Score
- Escape Severity: MEDIUM
Compliance
OWASP: API8:2023
pci: 6.5.10
gdpr: Article-32
soc2: CC1
psd2: Article-95
iso27001: A.14.2
nist: SP800-53
fedramp: AC-2
Classification
- CWE: 400
Score
- CVSS_VECTOR: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:R
- CVSS_SCORE: 6.9