Medium, CVSS 5.3npmAmendedPublished
GraphQL Armor Cost-Limit Plugin Bypass via Introspection Query Obfuscation
GHSA-733v-p3h5-qpq7
- Affected
- npm @escape.tech/graphql-armor-cost-limit < 2.4.2
- Fixed in
- 2.4.2· Vendor fix available
- Issue
- A 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. Details At the start of the computeComplexity function, we have the following check for ignoreIntrospection option: However, the node can be FieldNode | FragmentDefinitionNode | InlineFragmentNode | OperationDefinitionNode | FragmentSpreadNode So, for example, sending the following query would create an OperationDefinitionNode with node.name.value == 'hello' The proper way to handle this would be to check for the schema field, which would create a FieldNode. The fix is to assert that the node must be a FieldNode PoC Impact Applications using GraphQL Armor Cost Limit plugin with ignoreIntrospection enabled. Fix: Fixed on 772. A quick patch would be to set ignoreIntrospection to false.
Recommended action: Upgrade to 2.4.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.