> 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/privesc/sudoers/sudo-version-vulnerabilities-linux-privilege-escalation/sudo-version-1.8.27-cve-2019-14287.md).

# sudo 1.8.27 CVE-2019-14287

## Qué es

La escalada de privilegios en sudoers comienza con los comandos que un usuario puede ejecutar mediante `sudo`. Los binarios mal configurados, los argumentos de scripts inseguros, el manejo de enlaces simbólicos y las versiones vulnerables de sudo pueden convertir permisos limitados de sudo en una shell de root. Esta página en particular se centra en **sudo 1.8.27 \[CVE-2019-14287]** y mantiene práctico el flujo de explotación: identificar la condición, validarla de forma segura y luego ejecutar la carga útil mínima necesaria para demostrar el impacto.

## Enumeración

Comienza confirmando el contexto local y la configuración incorrecta exacta antes de ejecutar la ruta de explotación.

```bash
sudo -l
sudo --version
```

## Ejemplos

### Abuso del privilegio sudo (CVE-2019-14287):

Al examinar los privilegios de sudo, descubrimos una configuración vulnerable en el archivo sudoers. Usando el `sudo -l` comando, hemos identificado un privilegio para conectarnos como todos los usuarios, excepto `root`, con el `/bin/bash` comando:

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

{% embed url="<https://www.exploit-db.com/exploits/47502>" %}

Esta vulnerabilidad afecta a todas las versiones de sudo anteriores a la 1.8.27.

En nuestro caso, la versión de sudo es inferior a 1.8.27, lo que hace que esta vulnerabilidad sea explotable.

<figure><img src="/files/f2483073a0f4faba1633ecb22da3d323e13a5324" alt="" width="510"><figcaption></figcaption></figure>

Para explotar esta vulnerabilidad, simplemente ejecuta el siguiente comando:

```bash
sudo -u#-1 /bin/bash
```

Este comando te permite ejecutar una shell como el usuario `-1`, que corresponde al usuario `root`.

<figure><img src="/files/4f4ef1e2338167ac4ce76014c125529ceadcc79c" alt="" width="563"><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/privesc/sudoers/sudo-version-vulnerabilities-linux-privilege-escalation/sudo-version-1.8.27-cve-2019-14287.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.
