Finding XSS Through HTML Injection — Without Fuzzing Tools
嗯,用户让我总结一篇文章,控制在100字以内,而且不需要特定的开头。首先,我得通读文章,抓住主要内容。 文章讲的是寻找XSS漏洞时,作者没有使用模糊测试工具,而是通过观察应用的行为发现了HTML注入。他注意到页面源代码中有一个指向.php文件的链接,这在现代框架中不常见。接着他测试了注入点,发现普通payload被阻止了,但用SVG onload绕过了过滤机制。 所以,总结的时候要包括:XSS测试、观察应用行为、发现HTML注入、测试payload、WAF过滤问题以及利用SVG绕过。控制在100字以内,直接描述内容。 最后检查一下字数和要求是否符合用户的需求。 </think> 在寻找XSS漏洞时,作者通过观察应用行为而非使用模糊测试工具发现了HTML注入。页面源代码中出现的.php文件链接引起注意。测试显示普通payload被阻止,但利用SVG元素绕过过滤机制成功执行JavaScript。 2026-3-27 11:1:10 Author: infosecwriteups.com(查看原文) 阅读量:3 收藏

Windasunny

Note: All sensitive information has been redacted

When hunting for XSS, most people immediately reach for fuzzing tools. But sometimes, slowing down and simply observing how an application behaves can uncover just as much — if not more.

Where did the HTML Injection come from?

While testing the application, I wasn’t actively fuzzing inputs at that time. Instead, I was following normal business logic, trying to understand how the system works and whether any logical flaws existed.

During this process, I noticed something interesting while inspecting the page source.

<a href="http://redacted.com/redacted.php?parameter={email name}">

This immediately stood out.

Why? Because the application is built on a modern framework where routing is handled cleanly — no .php files are exposed anywhere else. Every page follows a consistent route-based structure. Yet here was a direct reference to a .php endpoint.

That inconsistency is often a signal worth investigating.

Testing for Injection

Naturally, the next step was to test whether the parameter was injectable. I started with a harmless payload:

<h1>Hello</h1>

The result? It rendered successfully — not escaped, not sanitized. That confirmed HTML injection.

Get Windasunny’s stories in your inbox

Join Medium for free to get updates from this writer.

Remember me for faster sign in

Next, I tried a classic XSS payload:

<script>alert(1)</script>

Blocked.

At first glance, it looked like a WAF was doing its job. But the filtering behavior suggested something superficial — likely keyword-based blocking.

So I adjusted the payload slightly:

<svg onload=confirm(1)>

And… it worked.

Why did it work?

The WAF appeared to block obvious patterns like script and alert, but failed to account for alternative event-based payloads. This is a common weakness in naive filtering mechanisms.

By leveraging an SVG element with an onload event, I was able to bypass the filter and achieve JavaScript execution.

Finally

Press enter or click to view image in full size

  • Report: Accepted
  • Result: Fixed

文章来源: https://infosecwriteups.com/finding-xss-through-html-injection-without-fuzzing-tools-56e12143aff7?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh