Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable GraphQL mutation/query name suggestions? #5598

Closed
sandorvasas opened this issue Aug 10, 2021 · 2 comments
Closed

How to disable GraphQL mutation/query name suggestions? #5598

sandorvasas opened this issue Aug 10, 2021 · 2 comments

Comments

@sandorvasas
Copy link

sandorvasas commented Aug 10, 2021

I know it's a question, but I suspect they are cannot be disabled. They're also a security issue.
Our app has been subject to penetration testing and the following issue came up:

e.g. https://HOSTNAME/graphql?query={user_} results in GraphQL API suggesting mutations and queries which have a similar name to ”user_”.

I already disabled introspection with the graphql-disable-introspection npm module, but I can't find a setting to get rid of the query/mutation suggestions.

See related article:
https://apisecurity.io/issue-116-facebook-parler-api-vulnerabilities-clairvoyance/#tools--clairvoyance

@trevor-scheer
Copy link
Member

This is a known issue in the graphql-js library itself. For now, one solution might be to strip these out of the errors via formatError or a custom Apollo Server plugin.

Also, introspection can be disabled via configuration of Apollo Server, no additional npm module needed.

@glasser
Copy link
Member

glasser commented Aug 17, 2021

Duplicate of #3919

@glasser glasser marked this as a duplicate of #3919 Aug 17, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants