{"answers":{"affected":"2 open source packages ship an affected version, including @escape.tech/graphql-armor-cost-limit.","exploited":"There is no known exploitation of GHSA-733v-p3h5-qpq7 in the wild and no public exploit code.","fix":"Upgrade @escape.tech/graphql-armor-cost-limit to 2.4.2 or later.","what":"GHSA-733v-p3h5-qpq7 is a vulnerability in @escape.tech/graphql-armor-cost-limit, published on 25 Apr 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-733v-p3h5-qpq7 and fix it if it is affected.\n\nWhat it is: GHSA-733v-p3h5-qpq7 is a vulnerability in @escape.tech/graphql-armor-cost-limit, published on 25 Apr 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-733v-p3h5-qpq7 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @escape.tech/graphql-armor-cost-limit (npm): affected all versions; fixed in 2.4.2\n- @escape.tech/graphql-armor-cost-limit (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-733v-p3h5-qpq7/ (Markdown: https://insights.sbomify.com/GHSA-733v-p3h5-qpq7/index.md)","id":"GHSA-733v-p3h5-qpq7","markdown":"https://insights.sbomify.com/GHSA-733v-p3h5-qpq7/index.md","name":"GHSA-733v-p3h5-qpq7","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"patch","impacts":["security_bypass","denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"GraphQL security library","requires_auth":"none","summary":"Attackers can bypass GraphQL cost limits by naming queries __schema, potentially causing denial of service in applications using the default configuration.","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 cost restriction using the `cost-limit` 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 `computeComplexity` function, we have the following check for `ignoreIntrospection` option:\n\n```ts\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 `FieldNode | FragmentDefinitionNode | InlineFragmentNode | OperationDefinitionNode | FragmentSpreadNode`\n\nSo, for example, sending the following query\n\n```gql\nquery hello {\n  books {\n    title\n  }\n}\n```\n\nwould create an `OperationDefinitionNode` with `node.name.value == 'hello'`\n\nThe proper way to handle this would be to check for the `__schema` field, which would create a `FieldNode`.\n\nThe fix is\n\n```ts\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\nto assert that the node must be a `FieldNode`\n\n### PoC\n```gql\nquery  {\n  ...__schema\n}\n\nfragment __schema on Query {\n  books {\n    title\n    author\n  }\n}\n```\n\n```gql\nquery __schema {\n  books {\n    title\n    author\n  }\n}\n```\n\n### Impact\nApplications using GraphQL Armor Cost Limit plugin with `ignoreIntrospection` enabled.\n\n### Fix:\nFixed on [772](https://github.com/Escape-Technologies/graphql-armor/pull/772). A quick patch would be to set `ignoreIntrospection` to false.","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 Cost-Limit Plugin Bypass via Introspection Query Obfuscation","id":"GHSA-733v-p3h5-qpq7","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-cost-limit","purl":null,"source":"GHSA-733v-p3h5-qpq7"},{"ecosystem":"npm","fixed":["2.4.2"],"introduced":["0"],"last_affected":[],"package":"@escape.tech/graphql-armor-cost-limit","purl":"pkg:npm/%40escape.tech/graphql-armor-cost-limit","source":"GHSA-733v-p3h5-qpq7"}],"products":null,"published":"2025-04-25","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 cost limits by naming queries __schema, potentially causing denial of service in applications using the default configuration.","url":"https://insights.sbomify.com/GHSA-733v-p3h5-qpq7/"}