November 19, 2026
I Found a Stored XSS That Fires When You Click Follow
How It Started

By Youssef Ezzat
4 min read
How It Started
I was testing a private bug bounty program and I did what I always do โ I opened Burp and started watching what the app sends to the server.
I noticed that when I edited my creator profile, the app was sending a PATCH request to:
/p/community/api/v1/creator/{creatorId}/p/community/api/v1/creator/{creatorId}Nothing unusual so far. But I looked at the request body carefully. I tried sending extra fields that weren't in the UI โ just to see what the server would do with them.
One of them was nickname.
The server accepted it. No error. No rejection. Just {"status":"success"}.
That's when I got curious.
The Setup โ Two Nicknames, Two Different Rules
The platform has two separate "nickname" fields and they work very differently.
The main account nickname (the one you set in your normal profile settings) is properly protected. The API enforces a 20-character limit, and it HTML-encodes the output. Clean.
The community creator nickname is a completely different field on a different endpoint. It has no length limit. It has no HTML encoding. And โ this is the important part โ it's not even shown in the profile settings UI. You can only set it by sending a raw API request.
So I sent this:
PATCH /p/community/api/v1/creator/ek2ey2 HTTP/1.1
Host: [TARGET_DOMAIN]
Content-Type: application/json
Api-Token: <token from /p/community/api/v1/api-token>
Cookie: NEO_SES=<my session>
{"nickname":"<img src=x onerror=alert(document.domain)>"}PATCH /p/community/api/v1/creator/ek2ey2 HTTP/1.1
Host: [TARGET_DOMAIN]
Content-Type: application/json
Api-Token: <token from /p/community/api/v1/api-token>
Cookie: NEO_SES=<my session>
{"nickname":"<img src=x onerror=alert(document.domain)>"}Response:
{"status":"success"}{"status":"success"}Then I checked if the server actually stored it raw:
GET /p/community/api/v1/creator/ek2ey2
{
"result": {
"creator": {
"creatorId": "ek2ey2",
"nickname": "<img src=x onerror=alert(document.domain)>"
}
}
}GET /p/community/api/v1/creator/ek2ey2
{
"result": {
"creator": {
"creatorId": "ek2ey2",
"nickname": "<img src=x onerror=alert(document.domain)>"
}
}
}Yes. The server stored the raw HTML, no encoding at all.
Now I needed a way for it to actually execute.
The Sink โ dangerouslySetInnerHTML in the Toast
The platform's community pages use a toast notification system to show feedback messages. When you follow someone, a small popup appears that says something like:
You followed [nickname]You followed [nickname]I looked at how the app renders this message. It uses React's dangerouslySetInnerHTML:
// ToastContextProvider
{ __html: message }// ToastContextProvider
{ __html: message }If you don't know React โ dangerouslySetInnerHTML is a prop that tells React to inject a string directly as raw HTML into the DOM, bypassing all escaping. It's meant for cases where you have pre-sanitized trusted content. The name literally has the word "dangerously" in it as a warning.
The toast message was built by taking the creator's nickname and dropping it into a template string. So if the nickname is <img src=x onerror=alert()>, the full message becomes:
You followed <img src=x onerror=alert(document.domain)>You followed <img src=x onerror=alert(document.domain)>And that gets rendered as actual HTML in the browser.
Proof of Concept โ Full Walkthrough
I used two synthetic test accounts I created specifically for this test.
Attacker account: qa1794930896 (creatorId: ek2ey2)
Victim account: qa1794930010
Step 1 โ Set the payload as the attacker
I sent the PATCH request above with {"nickname":"<img src=x onerror=alert(document.domain)>"} and got {"status":"success"}.
Step 2 โ Log in as the victim and open the attacker's profile
I opened the attacker's public community profile:
https://[TARGET_DOMAIN]/p/community/en/u/_ek2ey2https://[TARGET_DOMAIN]/p/community/en/u/_ek2ey2Step 3 โ Click Follow
The moment I clicked Follow, the app sent the follow request and the toast appeared. The browser tried to load src=x, failed, and fired onerror.
A browser alert appeared with:
[TARGET_DOMAIN] says [TARGET_DOMAIN][TARGET_DOMAIN] says [TARGET_DOMAIN]JavaScript executed in the full target origin.
It also worked with Unfollow and Block โ any action that triggers the toast with the nickname.
What a Real Attacker Could Do
The PoC uses alert(document.domain) to prove execution. But with a real payload, an attacker could:
- Read the victim's login email โ the page at
https://[TARGET_DOMAIN]/en/accountis same-origin and loads in the authenticated session - Call platform APIs on the victim's behalf โ post comments, change profile data, follow/unfollow accounts โ all with the victim's cookies
- Chain into account takeover โ the platform has a web bridge for account-level actions; an attacker who can call same-origin APIs is in a strong position
The best part from an attacker's perspective: the payload is stored once and fires for every user who interacts with the profile. No phishing link needed. The victim just has to click Follow on what looks like a normal profile.
Why This Bug Exists
Three things had to go wrong at the same time:
1. Mass assignment in the PATCH endpoint
The community creator API accepted a nickname field that the UI never exposes. The server should explicitly allowlist which fields can be updated through each endpoint and reject anything not on that list.
2. No validation on the community nickname
The account-level nickname API has a 20-character limit and HTML-encodes output. The community nickname had neither. Two APIs for the same concept, built at different times, with completely different security rules. This is a very common pattern in older platforms โ the original API was done right, and something built later skipped the same controls.
3. dangerouslySetInnerHTML on user input
The toast component rendered the {name} interpolation as raw HTML. User-controlled values should always go through React's normal rendering ({message} not {{__html: message}}), which treats them as text. dangerouslySetInnerHTML should only be used for trusted, already-sanitized HTML โ not strings that contain user nicknames.
The Triage
The triager initially couldn't reproduce it because I had cleaned up the payload after submitting. Once I explained that and provided a fresh recording showing the alert firing with document.domain, plus a live window where they could test it themselves, it was validated.
The final severity was Medium (CVSS 5.1). The UI:A (user interaction required) dropped it from High โ the victim has to click Follow or Block. That's fair. But it's worth noting: clicking Follow on someone's profile is one of the most normal things you do on the platform. The interaction bar is as low as it gets.
Takeaways
Intercept everything, even the fields you can't see in the UI. The nickname field didn't exist anywhere on the settings page. I only found it by reading the raw PATCH request body. Mass assignment bugs almost always live in fields the app sends to the server but doesn't show to the user.
When you find stored user input, ask where it shows up. I stored the HTML โ but that alone does nothing. The question was: where does this nickname get rendered? Following that thread led me to the toast and then to dangerouslySetInnerHTML. Map the data flow.
Look for dangerouslySetInnerHTML in React apps. When you find a place where user content appears in a notification or message, search the JS source for dangerouslySetInnerHTML. It's not always there, but when it is, the question becomes whether you can get your data into the string it renders.
Two APIs for the same field means two validation paths. Whenever a platform has a "community" version and a "main" version of the same concept, the community one is usually newer and usually less locked down. Always compare them.
Thanks for reading.
โ Youssef Ezzat