> 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

Notas de XSS almacenado en un href de ancla con comillas codificadas 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.

### XSS almacenado en el atributo href de un enlace con 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 `&lt;a href="..."&gt;`, y las comillas dobles están codificadas, pero la URI del enlace sigue siendo utilizable.

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-5db99338e8c66b19151aa1d935f210d597f988e1%2F%7BA69FED61-6A73-40EA-9542-A5251320CB15%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Envía un comentario para que, cuando se haga clic en el nombre del autor, un `alert()` se ejecutará en el navegador del visitante.

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

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

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-131efd966b875608203c08f27fdfc06f425a8ddd%2F%7BAA7246A7-E75D-4FAF-B5C5-066833D26D20%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-0a58b493a9314ce072c86bbbd05660bad1cbea62%2F%7B534A1E11-FCCD-4E87-9691-C965D601782F%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/xss/stored-xss-in-anchor-href-with-encoded-quotes.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.
