Width limit
Description
GraphQL defines the maximum width of a query as the maximum number of subfields queried from one field.
If no limit is set on query width, clients may therefore craft a complex query that could lead to potential DoS attacks or information leakage.
Remediation
Set a threshold on the maximum number of subfields that can be queried simultaneously.
GraphQL Specific
Apollo
Yoga
Awsappsync
Graphqlgo
Graphqlruby
Hasura
Configuration
Identifier:
resource_limitation/graphql_width_limit
Options
- threshold : Maximum width before raising an alert (-1 = infinite).
Examples
Ignore this check
checks:
resource_limitation/graphql_width_limit:
skip: true
Score
- Escape Severity: LOW
Compliance
OWASP: API4:2023
pci: 6.5.10
gdpr: Article-32
soc2: CC6
psd2: Article-94
iso27001: A.14.2
nist: SP800-53
fedramp: SC-5
Classification
- CWE: 770
Score
- CVSS_VECTOR: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:H/RL:O/RC:C
- CVSS_SCORE: 5.1