GHSA-hmfr-rx46-4jx2: @escape.tech/graphql armor max depth GraphQL Armor Max-Depth Plugin Bypass Vulnerability

MODERATE
CVSS 5.3
CWE-400
Published
Advisory Summary

GHSA-hmfr-rx46-4jx2 is a MODERATE (CVSS 5.3) graphql armor max-depth plugin bypass vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting @escape.tech/graphql armor max depth libraries in the npm ecosystem. The issue involves graphql armor max-depth plugin bypass via introspection query obfuscation. Remediation is available by upgrading affected packages to version 2.4.2.

GHSA-hmfr-rx46-4jx2 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-hmfr-rx46-4jx2
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product @escape.tech/graphql armor max depth
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix GHSA-hmfr-rx46-4jx2

To remediate this vulnerability, upgrade all affected @escape.tech/graphql armor max depth dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@escape.tech/graphql-armor-max-depth fixed: 2.4.2
npm install @escape.tech/graphql-armor-max-depth@2.4.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @escape.tech/graphql-armor-max-depth

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-hmfr-rx46-4jx2, inspect your project dependencies using npm:

npm ls @escape.tech/graphql-armor-max-depth

Analyze the terminal output to locate any version of @escape.tech/graphql armor max depth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.2), your application is affected.

Note: The npm ls @escape.tech/graphql-armor-max-depth command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In @escape.tech/graphql armor max depth, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A 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`. ### Details At the start of the `countDepth` function, we have the following check for the `ignoreIntrospection` option: ```typescript if (this.config.ignoreIntrospection && 'name' in node && node.name?.value === '__schema') { return 0; } ``` However, the `node` can be one of: `FieldNode`, `FragmentDefinitionNode`, `InlineFragmentNode`, `OperationDefinitionNode`, `FragmentSpreadNode`. For example, consider sending the following query: ```graphql query hello { books { title } } ``` This would create an `OperationDefinitionNode` where `node.name.value == 'hello'` The proper way to handle this is to check explicitly for the `__schema` field, which corresponds to a `FieldNode`. The fix is ```typescript if ( this.config.ignoreIntrospection && 'name' in node && node.name?.value === '__schema' && node.kind === Kind.FIELD ) { return 0; } ``` This ensures that the node is explicitly a `FieldNode`. ### PoC Max depth: `6` ```graphql query { books { author { books { author { ...__schema } } } } } fragment __schema on Author { books { title } } ``` ### Impact This issue affects applications using the GraphQL Armor Depth Limit plugin with `ignoreIntrospection` enabled. ### Fix This is fixed in [PR#823](https://github.com/Escape-Technologies/graphql-armor/pull/823)

GHSA-hmfr-rx46-4jx2 Affected @escape.tech/graphql armor max depth Versions

1 component(s)
Fixed Versions:
2.4.2
Product / Package Ecosystem Affected Versions Fixed Version
@escape.tech/graphql-armor-max-depth
npm
< 2.4.2
2.4.2

References

Frequently Asked Questions

What is GHSA-hmfr-rx46-4jx2?
GHSA-hmfr-rx46-4jx2 is a security vulnerability in @escape.tech/graphql armor max depth involving GraphQL Armor Max-Depth Plugin Bypass via Introspection Query Obfuscation under CWE-400: Uncontrolled Resource Consumption.
Which @escape.tech/graphql armor max depth versions are affected?
Affected versions include releases prior to 2.4.2 across affected packages: @escape.tech/graphql-armor-max-depth.
What version fixes GHSA-hmfr-rx46-4jx2?
Upgrading to 2.4.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @escape.tech/graphql-armor-max-depth affected?
Yes, @escape.tech/graphql-armor-max-depth is affected in releases prior to 2.4.2. Upgrade your dependency to 2.4.2 or later.
What is the CVSS score of GHSA-hmfr-rx46-4jx2?
GHSA-hmfr-rx46-4jx2 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with GHSA-hmfr-rx46-4jx2?
GHSA-hmfr-rx46-4jx2 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for GHSA-hmfr-rx46-4jx2?
Run the dependency tree command: 'npm ls @escape.tech/graphql-armor-max-depth'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hmfr-rx46-4jx2",
  "modified" : "2025-08-26T18:42:37Z",
  "published" : "2025-08-26T18:42:37Z",
  "aliases" : [ ],
  "summary" : "GraphQL Armor Max-Depth Plugin Bypass via Introspection Query Obfuscation",
  "details" : "### 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 && 'name' in node && 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 &&\n      'name' in node &&\n      node.name?.value === '__schema' &&\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)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@escape.tech/graphql-armor-max-depth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.4.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.4.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Escape-Technologies/graphql-armor/security/advisories/GHSA-hmfr-rx46-4jx2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Escape-Technologies/graphql-armor/pull/823"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Escape-Technologies/graphql-armor/commit/1f923bc09f5f053f60b6ba2bd419d4b94cbe1db3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Escape-Technologies/graphql-armor"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-26T18:42:37Z",
    "nvd_published_at" : null
  }
}