# Insecure Direct Object Reference (IDORs)

Las **Insecure Direct Object References** (**IDOR**) son un tipo de vulnerabilidad de seguridad que se produce cuando una aplicación web utiliza **identificadores internos** (como números o nombres) para identificar y acceder a recursos (como archivos o datos) y no se valida adecuadamente la autorización del usuario para acceder a ellos.

Por ejemplo, supongamos que un usuario ‘**A**‘ tiene un pedido con el identificador numérico **123** y el usuario ‘**B**‘ tiene un pedido con el identificador numérico **124**. Si el atacante intenta acceder a través de la URL “\*\*<https://example.com/orders/124**“>, la aplicación web podría permitir el acceso a ese pedido sin validar si el usuario tiene permiso para acceder a él. De esta manera, el atacante podría acceder al pedido del usuario ‘**B**‘ sin la debida autorización.

Tenemos un laboratorio para probar esto es muy simple.

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

Tenemos que para este usuario su id es uno un identificador que identifica el cafe uno, donde tenemos una lista donde podemos ver 5 cafes supuestamente.

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

Pero como se explicaba arriba la web no valida si tienes permisos o no para hacerlo, osea buscar diferentes id, observamos que puedo ver el ID numeor 10 que corresponde a otro cafe.

Y ya esto es un IDOR


---

# Agent Instructions: 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:

```
GET https://rodgar.gitbook.io/rodgar/othe/owasp-top-10/insecure-direct-object-reference-idors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
