GHSA-224p-v68g-5g8f: @escape.tech/graphql armor max depth GraphQL Armor Max-Depth Plugin Bypass Vulnerability
MODERATEGHSA-224p-v68g-5g8f 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 fragment caching. Remediation is available by upgrading affected packages to version 2.4.2.
GHSA-224p-v68g-5g8f at a Glance
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).
How to Fix GHSA-224p-v68g-5g8f
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.
npm install @escape.tech/graphql-armor-max-depth@2.4.2
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-224p-v68g-5g8f, 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
GHSA-224p-v68g-5g8f Affected @escape.tech/graphql armor max depth Versions
1 component(s)| 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-224p-v68g-5g8f?
Which @escape.tech/graphql armor max depth versions are affected?
What version fixes GHSA-224p-v68g-5g8f?
Is @escape.tech/graphql-armor-max-depth affected?
What is the CVSS score of GHSA-224p-v68g-5g8f?
What CWE is associated with GHSA-224p-v68g-5g8f?
How can I check npm dependencies for GHSA-224p-v68g-5g8f?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-224p-v68g-5g8f",
"modified" : "2025-08-26T18:45:55Z",
"published" : "2025-08-26T18:45:55Z",
"aliases" : [ ],
"summary" : "GraphQL Armor Max-Depth Plugin Bypass via fragment caching",
"details" : "### Summary\nA query depth restriction using the max-depth can be bypassed if `ignoreIntrospection` is enabled (which is the default configuration) by naming your query/fragment `__schema`.\n\n### Details\nIn the `countDepth` function, we have the following code that calculates the depth of a used fragment:\n\n```typescript\n } else if (node.kind == Kind.FRAGMENT_SPREAD) {\n if (this.visitedFragments.has(node.name.value)) {\n return this.visitedFragments.get(node.name.value) ?? 0;\n } else {\n this.visitedFragments.set(node.name.value, -1);\n }\n const fragment = this.context.getFragment(node.name.value);\n if (fragment) {\n let fragmentDepth;\n if (this.config.flattenFragments) {\n fragmentDepth = this.countDepth(fragment, parentDepth);\n } else {\n fragmentDepth = this.countDepth(fragment, parentDepth + 1);\n }\n depth = Math.max(depth, fragmentDepth);\n if (this.visitedFragments.get(node.name.value) === -1) {\n this.visitedFragments.set(node.name.value, fragmentDepth);\n }\n }\n }\n```\n\nwhich will calculate the depth of the fragment used in the current node, store the value in `this.visitedFragments` and re-use it in the future to avoid re-calculating the depth for the same fragment.\n\nThe issue arises when the same fragment is used multiple times, **at different depths**. The current caching takes into account the depth of the first occurrence, which means if the fragment is re-used later in a higher depth, this cached value is not updated.\n\nSo, for example, sending the following query with a max depth of `6`:\n\n```graphql\nquery {\n books {\n author {\n ...Test\n }\n }\n books {\n author {\n books {\n author {\n ...Test\n }\n }\n }\n }\n}\nfragment Test on Author {\n books {\n title\n }\n}\n```\n\nThe first use of `Test` fragment does not exceed the defined limit, and this depth will be cached.\n\nIn the second use, the fragment is reused in a greater depth, but the `countDepth` function will still use the depth cached, without accounting for the increased depth.\n\n### PoC\n\nMax depth: `6`\n\n```graphql\nquery {\n books {\n author {\n ...Test\n }\n }\n books {\n author {\n books {\n author {\n ...Test\n }\n }\n }\n }\n}\nfragment Test on Author {\n books {\n title\n }\n}\n```\n\n### Impact\n\nThis issue affects applications using the GraphQL Armor Depth Limit plugin.\n\n### Fix\n\nThis is fixed in [PR#824](https://github.com/Escape-Technologies/graphql-armor/pull/824). We now store only the additional depth contributed by the fragment and add it to the parent depth where the fragment is used (`parentDepth`).",
"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-224p-v68g-5g8f"
}, {
"type" : "WEB",
"url" : "https://github.com/Escape-Technologies/graphql-armor/pull/824"
}, {
"type" : "WEB",
"url" : "https://github.com/Escape-Technologies/graphql-armor/commit/998986109f8c2313bd61325ddfe7f5dcd48f9232"
}, {
"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:45:55Z",
"nvd_published_at" : null
}
}