Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
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 applicationsLearn about Uncontrolled Recursion vulnerabilities in an interactive lesson.
Start learningUpgrade strawberry-graphql to version 0.315.7 or higher.
strawberry-graphql is an A library for creating GraphQL APIs
Affected versions of this package are vulnerable to Uncontrolled Recursion in the determine_depth function when processing GraphQL queries containing circular fragment references. An attacker can exhaust server CPU resources and cause the validation process to crash by submitting specially crafted queries with recursive fragment spreads.
import strawberry
from fastapi import FastAPI
from strawberry.fastapi import GraphQLRouter
from strawberry.extensions import QueryDepthLimiter
@strawberry.type
class User:
name: str = "GONA"
@strawberry.type
class Query:
@strawberry.field
def user(self) -> User:
return User()
# Enable depth limiting
schema = strawberry.Schema(
query=Query,
extensions=[QueryDepthLimiter(max_depth=10)]
)
app = FastAPI()
app.include_router(GraphQLRouter(schema), prefix="/graphql")