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

# XSS stocké dans un href d'ancre avec guillemets encodés

### XSS stocké dans l'attribut href d'une ancre avec des guillemets doubles encodés en HTML

Ce laboratoire contient une vulnérabilité XSS stockée dans la fonctionnalité de commentaire. Les guillemets doubles dans l’ `href` attribut sont encodés en HTML ("), ce qui affecte la manière d'injecter la charge utile.

Un commentaire enregistré peut contrôler le `href` attribut du nom de l'auteur dans la section des commentaires ; l'attribut est renvoyé sous forme d'ancre telle que `&lt;a href="..."&gt;`, et les guillemets doubles sont encodés, mais l'URI de l'ancre reste utilisable.

<figure><img src="/files/76f7bba01a31823e3074a2d78489d3771146f359" alt=""><figcaption></figcaption></figure>

Soumettez un commentaire afin que, lorsque le nom de l'auteur est cliqué, un `alert()` s'exécutera dans le navigateur du visiteur.

Utilisez une URI JavaScript dans le commentaire `href`, par exemple

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

<figure><img src="/files/2092211d56489c7d1e638fac85a9a9eecd1d162e" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/a0e6b4f085c6c2e048bdd518ebd1123454bc87b5" 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/fr/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.
