CVE-2026-115887: graphql-scalars PhoneNumber scalar is vulnerable to regular expression denial of service
GraphQL Scalars is a library of custom GraphQL scalars for creating precise type-safe GraphQL schemas. From 1.24.1 until 2.0.1, GraphQLPhoneNumber in src/scalars/PhoneNumber.ts uses ambiguous nested digit quantifiers that backtrack exponentially when a PhoneNumber value contains a run of digits followed by a character that makes the match fail. GraphQL evaluates parseLiteral during document validation and parseValue during variable coercion before resolver authentication or authorization, so a small unauthenticated request can block the Node.js event loop and stall the server process. serialize is also affected when unvalidated stored values are returned through the scalar. This issue is fixed in version 2.0.1.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
graphql-scalarsto a version that resolves this vulnerability.Fixed in 2.0.1
Event History
Frequently Asked Questions
Which deployments are exposed to unauthenticated denial of service?
Deployments using GraphQLPhoneNumber from graphql-scalars versions 1.24.1 through versions before 2.0.1 are exposed if an attacker can submit GraphQL documents or variables to the server. The vulnerable validation and coercion occur before resolver authentication or authorization, so authentication does not protect affected request paths.
What input is needed to trigger the issue?
An attacker can supply a PhoneNumber value containing a run of digits followed by a character that causes the regular-expression match to fail. The ambiguous nested digit quantifiers can then backtrack exponentially and block the Node.js event loop.
Can this be triggered without invoking a resolver?
Yes. GraphQL evaluates parseLiteral during document validation and parseValue during variable coercion, before resolver authentication or authorization. A small request can therefore stall the server process before application resolver logic runs.
Are there non-request paths that may be affected?
Yes. The scalar's serialize operation is also affected when unvalidated stored values are returned through GraphQLPhoneNumber. This means returning malformed persisted data through the scalar can trigger the same behavior.
What version resolves the vulnerability?
The issue is fixed in graphql-scalars version 2.0.1.