Vulnerability · Published Jan 9, 2025 · Assigned by GitHub_M
CVE-2025-22151Strawberry GraphQL has a type resolution vulnerability
Low 3.7
In plain English
A low-severity type confusion in strawberry from strawberry-graphql. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 33% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Strawberry GraphQL is a library for creating GraphQL APIs. Starting in 0.182.0 and prior to version 0.257.0, a type confusion vulnerability exists in Strawberry GraphQL's relay integration that affects multiple ORM integrations (Django, SQLAlchemy, Pydantic). The vulnerability occurs when multiple GraphQL types are mapped to the same underlying model while using the relay node interface. When querying for a specific type using the global node field (e.g., FruitType:some-id), the resolver may incorrectly return an instance of a different type mapped to the same model (e.g., SpecialFruitType). This can lead to information disclosure if the alternate type exposes sensitive fields and potential privilege escalation if the alternate type contains data intended for restricted access. This vulnerability is fixed in 0.257.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | strawberry-graphql | 0.257.0 | GHSA-5xh2-23cc-5jc6 |
| PyPI | strawberry-graphql | 0.257.0 | PYSEC-2026-1946 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| strawberry-graphql | strawberry | >= 0.182.0, < 0.257.0 |
Weakness: CWE-843 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N