# GraphQL API vulnerabilities

## Lab: Accessing private GraphQL posts

### Enunciado

La página del blog de este laboratorio contiene una entrada oculta que tiene una contraseña secreta. Encuentra la entrada de blog oculta y escribe la contraseña.

### Resolución

<figure><img src="/files/eX5Agw69fKYTTRVeJwmS" alt=""><figcaption></figcaption></figure>

Vemos que en la respuesta falta el post 3. Mandamos la petición al **Repeater**. Nos damos cuenta que si cambiamos el **ID** del post en la petición a **3** nos sale el post en cuestión.

<figure><img src="/files/DA8CIiDYW8WfOu2LThQE" alt=""><figcaption></figcaption></figure>

Ahora para conseguir la contraseña vamos a la sección de GraphSQL.

<figure><img src="/files/NTEf8XMg6NPMEl0cSabU" alt=""><figcaption></figcaption></figure>

Buscamos referencia a password y volvemos a la petición de antes. Modificamos consulta pegando la referencia de password.

<figure><img src="/files/OaMmSpSEpbx2oC8gtJoY" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/hoX71CqECwZliyQzF4Ga" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://beafn28.gitbook.io/beafn28/web-security/laboratorios-portswigger/graphql-api-vulnerabilities.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
