Replies: 1 comment
-
graphql-java has quite a few limits you can set. While not "alias" overloading specific, they do aim to prevent this style of attack. At the parser level we have
This is the first and most important stage - limit how much work the query parser will do. You can use There is another attack vector that was recently discovered and thats crafted introspection queries that can exploded how how many fields need to be executed. Some people like to disable introspection in production (I am not a fan but you can) graphql-java ships with Its also has limits on how deep the introspection query can be (even aide from the field explosion trick)
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I couldn't find any documentation on how to configure limits on alias overloading to defend against Denial of Service attack as described here: https://checkmarx.com/blog/alias-and-directive-overloading-in-graphql/.
The closest thing I could find is the instrumentation in this PR, which appears to be providing the necessary functionality. Not sure if this is really limited to alias overloading or if it's actually broader than that?
I've added this for now to our project, since this seems to increase security. Would be nice to have more documentation and built-in security for this in the core library though.
Beta Was this translation helpful? Give feedback.
All reactions