> 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/xss/stored-xss-in-anchor-href-with-encoded-quotes.md).

# XSS almacenado en un href de ancla con comillas codificadas

### XSS almacenado en el atributo href de un enlace con las comillas dobles codificadas en HTML

Este laboratorio contiene una vulnerabilidad XSS almacenada en la función de comentarios. Las comillas dobles en el `href` atributo están codificadas en HTML (") , lo que afecta a cómo inyectar la carga útil.

Un comentario guardado puede controlar el `href` atributo del nombre del autor en la sección de comentarios; el atributo se devuelve como un enlace, como por ejemplo `&lt;a href="..."&gt;`y las comillas dobles están codificadas, pero la URI del enlace sigue siendo utilizable.

<figure><img src="/files/32ffd218fb3fb7544fac636a7caa853c0832c7da" alt=""><figcaption></figcaption></figure>

Envía un comentario de modo que, cuando se haga clic en el nombre del autor, se ejecute un `alert()` en el navegador del visitante.

Usa una URI de JavaScript en el comentario `href`, por ejemplo

```javascript
javascript:alert(document.cookie)
```

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

<figure><img src="/files/097c0c8d7390b4dafec8e9b0b8354313df8dc94f" 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/xss/stored-xss-in-anchor-href-with-encoded-quotes.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.
