Uncontrolled Resource Consumption ('Resource Exhaustion') Affecting github.com/99designs/gqlgen/graphql/executor package, versions <0.17.49


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-GOLANG-GITHUBCOM99DESIGNSGQLGENGRAPHQLEXECUTOR-7252138
  • published 14 Jun 2024
  • disclosed 12 Jun 2024
  • credit Yuval Moravchick

How to fix?

Upgrade github.com/99designs/gqlgen/graphql/executor to version 0.17.49 or higher.

Overview

Affected versions of this package are vulnerable to Uncontrolled Resource Consumption ('Resource Exhaustion') due to improper limiting of the number of directives sent through the parserDirectives function. An attacker can cause a denial of service by sending a specially crafted script.

PoC


query {
  user @aa @aa @aa ... {
    name
  }
}

Replace ... with as many @aa as you need. The more you add, the larger the response size and time processed.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
5.3 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    None
  • Integrity (I)
    None
  • Availability (A)
    Low