> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/fr/web/access-control/user-id-controlled-by-unpredictable-guid-parameter.md).

# ID utilisateur contrôlé par un paramètre GUID imprévisible

#### ID utilisateur contrôlé par un paramètre

Ce laboratoire présente une **escalade horizontale des privilèges** problème sur la page du compte utilisateur. / La particularité est que **les utilisateurs sont identifiés par des GUID**, c'est-à-dire des identifiants longs et aléatoires, par exemple :

```bash
9e2f3fc0-7035-48ed-ad6d-f643690c7b9d
```

Après s'être connecté au compte **wiener:peter**, vous pouvez voir votre propre GUID dans la section Mon compte.

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

#### **Récupération des GUID via les publications**

En parcourant le site, nous trouvons dans les **publications visibles** les GUID des autres utilisateurs :

* Le GUID de l'administrateur apparaît dans l'un de ses articles.

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

De même, nous pouvons récupérer le GUID à partir de **carlos**.

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

```bash
?userId=5abc76d3-7763-4be9-83d1-c6181bcdf0b5
```

#### **Opération : accès au compte de Carlos**

La page du compte est accessible via un paramètre contrôlable :

```bash
my-account?id=5abc76d3-7763-4be9-83d1-c6181bcdf0b5
```

En remplaçant simplement notre GUID par **carlos**, nous obtenons son compte :

<figure><img src="/files/5a0effa2c77880e8144f9f161b45be073706d816" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/fr/web/access-control/user-id-controlled-by-unpredictable-guid-parameter.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
