Graphql-hive graphql-scalars
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 versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.24.1, < 2.0.1
Fixed in 2.0.1
Mitigation
Upgrade graphql-scalars to 2.0.1 or later.
References
- Vendor advisory github.com/graphql-hive/graphql-scalars/securi…
- Patch github.com/graphql-hive/graphql-scalars/pull/2…
- Patch github.com/graphql-hive/graphql-scalars/commit…
1 more
- Release notes github.com/graphql-hive/graphql-scalars/releas…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.