> 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/de/web/xss/xss-reflected-in-an-attribute-with-encoded-angle-brackets.md).

# Reflektiertes XSS in einem Attribut mit kodierten spitzen Klammern

### Reflektiertes XSS in ein Attribut mit HTML-kodierten spitzen Klammern

Dieses Labor enthält eine XSS-Schwachstelle, die sich in der Suchfunktion des Blogs widerspiegelt: Der vom Benutzer bereitgestellte Inhalt wird in den Wert eines `Wert` Attributs eines `<input>`, und die `<` und `>` spitzen Klammern werden in HTML kodiert (`&lt;`, `&gt;`). Ziel ist es, ein neues Attribut einzuschleusen, das `alert()`.

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

#### Beobachtungen

* Der eingegebene Text erscheint im `Wert` Attribut des Eingabefelds.
* Der Versuch, `">test` wird durch die Kodierung der spitzen Klammern neutralisiert, sodass Sie auf diese Weise kein neues Tag öffnen können.

```
">test
```

<figure><img src="/files/359e4b38424a6d4ef893a2ca15b4e5be3088cd21" alt=""><figcaption></figcaption></figure>

Da der Wert jedoch in Anführungszeichen eingeschlossen ist, kann man den `Wert` Wert schließen und demselben `<input>` Element durch Einschleusen einer Sequenz mit einem schließenden Anführungszeichen hinzufügen.

```javascript
hola\" test=\"hello
```

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

1. Schließen Sie den `Wert` Wert mit einem eingeschleusten doppelten Anführungszeichen.
2. Fügen Sie ein neues Ereignisattribut hinzu (z. B. `onmouseover`) das den Aufruf von `alert()`.

```javascript
test\" onmouseover=\"alert(0)
```

<figure><img src="/files/5c84b6a2729143366cfe3510a6017af967d2d906" alt=""><figcaption></figcaption></figure>

* Die Nutzlast schließt das `Wert` Attribut und fügt `onmouseover=\"alert(0)\"` dem `<input>` Element hinzu.

<figure><img src="/files/60d605c6fe5cc54dda41fe8178d71f6d0df2702c" 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/de/web/xss/xss-reflected-in-an-attribute-with-encoded-angle-brackets.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.
