Cyber Risks · PortSwigger Research

Lab: Accessing private GraphQL posts

Summary: PortSwigger's lab shows a GraphQL endpoint at POST /graphql/v1 that exposes a postPassword field on the BlogPost type when an introspection query is sent. By changing the id variable to 3 and adding postPassword to the query, the hidden blog post's secret password is returned in the response.

Bottom line: A GraphQL schema that answers introspection queries can disclose fields like postPassword that were never meant to be reachable, so the API hands over the secret to anyone who asks for it by name.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related