Files
2026-01-02 01:48:18 +08:00

18 lines
790 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
### 如果你发现一个输入点最终进入了 `<textarea>`,你是直接放弃,还是继续深入?为什么?
`<textarea>` 属于 **RCDATA 元素**。浏览器在解析它时,会一直寻找闭合标签 `</textarea>`
- **深入策略**:我首先会测试是否能直接闭合标签
- **Payload**`</textarea><script>alert(1)</script>`
如果后端没有对 `</textarea>` 这一特定字符串进行过滤或转义,解析器会立即跳出“文本模式”回到“HTML 模式”,从而执行后面的脚本
有些 WAF 会过滤 `<script>`,但对换行符的处理非常粗糙
在某些环境下,利用换行符或不可见字符可能导致过滤器认为 Payload 已经结束,但浏览器却能将其连贯解析
```
</textarea
> <svg/onload=alert(1)>
```