{"answers":{"affected":"3 open source packages ship an affected version, including strawberry-graphql.","exploited":"There is no known exploitation of CVE-2025-22151 in the wild and no public exploit code.","fix":"Upgrade strawberry-graphql to 0.257.0 or later.","what":"CVE-2025-22151 is a low-severity vulnerability in strawberry-graphql strawberry, published on 9 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-22151 and fix it if it is affected.\n\nWhat it is: CVE-2025-22151 is a low-severity vulnerability in strawberry-graphql strawberry, published on 9 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-22151 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- strawberry-graphql (PyPI): affected from 0.182.0; fixed in 0.257.0\n- strawberry-graphql (PyPI): affected from 0.182.0; fixed in 0.257.0\n- strawberry-graphql (PyPI): affected from 0.182.0; fixed in 0.257.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-22151/ (Markdown: https://insights.sbomify.com/CVE-2025-22151/index.md)","id":"CVE-2025-22151","markdown":"https://insights.sbomify.com/CVE-2025-22151/index.md","name":"CVE-2025-22151","record":{"aliases":["GHSA-5xh2-23cc-5jc6","PYSEC-2026-1946"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"GraphQL library","requires_auth":"none","summary":"Attackers can access sensitive data or escalate privileges by exploiting type confusion in Strawberry GraphQL's relay node resolution.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":3.7,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-843","name":"Access of Resource Using Incompatible Type"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Strawberry GraphQL has a type resolution vulnerability","id":"CVE-2025-22151","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"information_disclosure","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"Improper Path Validation Enables Path Traversal in Multiple Components in Atheos","id":"CVE-2025-22152"},"packages":[{"ecosystem":"PyPI","fixed":["0.257.0"],"introduced":["0.182.0"],"last_affected":[],"package":"strawberry-graphql","purl":null,"source":"GHSA-5xh2-23cc-5jc6"},{"ecosystem":"PyPI","fixed":["0.257.0"],"introduced":["0.182.0"],"last_affected":[],"package":"strawberry-graphql","purl":"pkg:pypi/strawberry-graphql","source":"GHSA-5xh2-23cc-5jc6"},{"ecosystem":"PyPI","fixed":["0.257.0"],"introduced":["0.182.0"],"last_affected":[],"package":"strawberry-graphql","purl":"pkg:pypi/strawberry-graphql","source":"PYSEC-2026-1946"}],"prev":{"headline":"Undici Uses Insufficiently Random Values","id":"CVE-2025-22150"},"products":["strawberry"],"published":"2025-01-09","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-01-09","vendors":["strawberry-graphql"]},"summary":"Attackers can access sensitive data or escalate privileges by exploiting type confusion in Strawberry GraphQL's relay node resolution.","url":"https://insights.sbomify.com/CVE-2025-22151/"}