Finding XSS Through HTML Injection — Without Fuzzing Tools
好的,我现在需要帮用户总结一篇文章的内容,控制在100字以内。用户要求直接写描述,不需要特定的开头。首先,我得仔细阅读文章内容,理解其主要观点。 文章讲的是在寻找XSS漏洞时,作者没有使用模糊测试工具,而是通过观察应用的行为发现了问题。他注意到页面源代码中有一个指向.php文件的链接,这在现代框架中是不常见的。接着他测试了HTML注入和XSSayload,发现虽然简单的script标签被阻止了,但通过svg元素成功绕过了过滤机制。 接下来,我需要提取关键点:HTML注入的来源、测试过程、WAF的弱点以及最终结果。然后用简洁的语言把这些点连贯地表达出来,确保不超过100字。 可能遇到的问题是如何在有限的字数内涵盖所有重要信息。我需要选择最核心的内容,比如发现过程、测试方法和结果。同时要避免使用复杂的术语,让总结更易理解。 最后检查一下字数是否符合要求,并确保内容准确传达了原文的核心信息。 </think> 作者在测试应用时未主动模糊输入,而是通过观察页面行为发现了一个指向.php文件的链接。测试发现参数可注入HTML和XSSayload,尽管部分payload被WAF阻止,但通过svg元素成功绕过过滤机制并执行JavaScript。最终报告被接受并修复。 2026-3-27 11:1:10 Author: infosecwriteups.com(查看原文) 阅读量:1 收藏

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--bug_bounty
如有侵权请联系:admin#unsafe.sh