Insufficient Type Distinction Affecting strawberry-graphql package, versions [0.182.0,0.257.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

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 IDSNYK-PYTHON-STRAWBERRYGRAPHQL-8610312
  • published10 Jan 2025
  • disclosed9 Jan 2025
  • creditjamietdavidson

Introduced: 9 Jan 2025

NewCVE-2025-22151  (opens in a new tab)
CWE-351  (opens in a new tab)

How to fix?

Upgrade strawberry-graphql to version 0.257.0 or higher.

Overview

strawberry-graphql is an A library for creating GraphQL APIs

Affected versions of this package are vulnerable to Insufficient Type Distinction in the relay integration that affects multiple ORM integrations (Django, SQLAlchemy, Pydantic). An attacker can access unauthorized data by querying for a specific type using the global node field, which may incorrectly return an instance of a different type mapped to the same model.

Note:

This is only exploitable if Multiple GraphQL types inherit from relay.Node, these types are mapped to the same database model and the global node field is used for type resolution.

References

CVSS Scores

version 4.0
version 3.1