Skip to content
Info disclosure Disclosed report Beginner

GraphQL introspection query works through unauthenticated WebSocket

An unauthenticated WebSocket connection allowed execution of GraphQL introspection queries, exposing the full API schema. An attacker could use this information to plan more complex attacks.

zerodivisi0n Follow

Originally disclosed on HackerOne

Medium 6.1 View original
  • Disclosed after 8 months

Summary:

It is possible to execute GraphQL introspection query through unauthenticated WebSocket connection. PoC included.

Steps To Reproduce:

To simplify reproducing I provided a simple html PoC file.

  1. Start python static http server in directory with poc file: python3 -m http.server (this step is required to bypass CORS restrictions for opening local file in the browser)
  2. Open file in the browser: http://localhost:8000/ws.html
  3. GraphQL schema dump will be displayed on the page

The problem occurs because of the websocket request with type start(maybe others too, I didn't check) allows to pass introspection query in it ({type: "start", payload: {query: "query IntrospectionQuery{ ... }"}})

Supporting Material/References:

Impact

This information reveals the full GraphQL API with all methods and data types. This can be used to perform more complex attacks.

The original report as published on HackerOne, by zerodivisi0n. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the WebSocket endpoint did not enforce authentication before processing GraphQL 'start' messages, allowing introspection queries.

Impact

This reveals the full GraphQL API with all methods and data types, which could be used to perform more complex attacks.

What the attacker needed

No authentication required; WebSocket endpoint accessible

How it was found

  1. Start a local HTTP server to serve the PoC file and avoid CORS issues.
  2. Open the PoC HTML file in a browser.
  3. Observe the GraphQL schema dump displayed on the page.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

GraphQL is a way for apps to ask a server for data. Normally, only logged-in users should be able to ask the server to describe its entire data structure (called introspection). Here, anyone could do that without logging in, which gives attackers a map of the API.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by zerodivisi0n

View all

2 more disclosed reports, best first.

More from Nuri

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.