{"answers":{"affected":"2 open source packages ship an affected version, including @escape.tech/graphql-armor-max-depth.","exploited":"There is no known exploitation of GHSA-hmfr-rx46-4jx2 in the wild and no public exploit code.","fix":"Upgrade @escape.tech/graphql-armor-max-depth to 2.4.2 or later.","what":"GHSA-hmfr-rx46-4jx2 is a vulnerability in @escape.tech/graphql-armor-max-depth, published on 26 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-hmfr-rx46-4jx2 and fix it if it is affected.\n\nWhat it is: GHSA-hmfr-rx46-4jx2 is a vulnerability in @escape.tech/graphql-armor-max-depth, published on 26 Aug 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 GHSA-hmfr-rx46-4jx2 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @escape.tech/graphql-armor-max-depth (npm): affected all versions; fixed in 2.4.2\n- @escape.tech/graphql-armor-max-depth (npm): affected all versions; fixed in 2.4.2\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/GHSA-hmfr-rx46-4jx2/ (Markdown: https://insights.sbomify.com/GHSA-hmfr-rx46-4jx2/index.md)","id":"GHSA-hmfr-rx46-4jx2","markdown":"https://insights.sbomify.com/GHSA-hmfr-rx46-4jx2/index.md","name":"GHSA-hmfr-rx46-4jx2","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"GraphQL security library","requires_auth":"none","summary":"Attackers can bypass GraphQL depth limits by naming fragments __schema, allowing resource exhaustion or DoS in applications using graphql-armor.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Summary\nA query depth restriction using the `max-depth` property can be bypassed if `ignoreIntrospection` is enabled (which is the default configuration) by naming your query/fragment `__schema`.\n\n### Details\nAt the start of the `countDepth` function, we have the following check for the `ignoreIntrospection` option:\n\n```typescript\n    if (this.config.ignoreIntrospection \u0026\u0026 'name' in node \u0026\u0026 node.name?.value === '__schema') {\n        return 0;\n    }\n```\n\nHowever, the `node` can be one of: `FieldNode`, `FragmentDefinitionNode`, `InlineFragmentNode`, `OperationDefinitionNode`, `FragmentSpreadNode`.\n\nFor example, consider sending the following query:\n\n```graphql\nquery hello {\n  books {\n    title\n  }\n}\n```\n\nThis would create an `OperationDefinitionNode` where `node.name.value == 'hello'`\n\nThe proper way to handle this is to check explicitly for the `__schema` field, which corresponds to a `FieldNode`.\n\nThe fix is\n\n```typescript\n    if (\n      this.config.ignoreIntrospection \u0026\u0026\n      'name' in node \u0026\u0026\n      node.name?.value === '__schema' \u0026\u0026\n      node.kind === Kind.FIELD\n    ) {\n      return 0;\n    }\n```\n\nThis ensures that the node is explicitly a `FieldNode`.\n\n### PoC\n\nMax depth: `6`\n\n```graphql\nquery {\n  books {\n    author {\n      books {\n        author {\n          ...__schema\n        }\n      }\n    }\n  }\n}\nfragment __schema on Author {\n  books {\n    title\n  }\n}\n```\n\n### Impact\n\nThis issue affects applications using the GraphQL Armor Depth Limit plugin with `ignoreIntrospection` enabled.\n\n### Fix\n\nThis is fixed in [PR#823](https://github.com/Escape-Technologies/graphql-armor/pull/823)","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"GraphQL Armor Max-Depth Plugin Bypass via Introspection Query Obfuscation","id":"GHSA-hmfr-rx46-4jx2","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"security_feature_bypass","year":"2025"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["2.4.2"],"introduced":["0"],"last_affected":[],"package":"@escape.tech/graphql-armor-max-depth","purl":null,"source":"GHSA-hmfr-rx46-4jx2"},{"ecosystem":"npm","fixed":["2.4.2"],"introduced":["0"],"last_affected":[],"package":"@escape.tech/graphql-armor-max-depth","purl":"pkg:npm/%40escape.tech/graphql-armor-max-depth","source":"GHSA-hmfr-rx46-4jx2"}],"products":null,"published":"2025-08-26","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can bypass GraphQL depth limits by naming fragments __schema, allowing resource exhaustion or DoS in applications using graphql-armor.","url":"https://insights.sbomify.com/GHSA-hmfr-rx46-4jx2/"}