My first bounty, IDOR + Self XSS [€3000]
A chat application reflected XSS payloads only in the sender's own view, and a separate IDOR allowed retrieving a user's secret key by supplying their username, enabling an attacker to inject HTML into another user's chat session. The combined issues could lead to XSS on older browsers or when CSP is not enabled.
{{media:0}}
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This is the story of a first bounty on Intigriti, a bug bounty platform. The target was not the main www.intigriti.com application but a third-party chat application that Intigriti embeds in its domain. Hackers use that chat to contact Intigriti support. The chat communicates over WebSockets, and messages support Markdown formatting, including backticks for code blocks.
The write-up walks through two findings that were eventually paid together: a self-XSS in the chat rendering, and an IDOR in the chat authentication flow that turned the self-XSS into an attack on other users. The author frames the story around three concepts: Markdown, WebSockets and reflected XSS.

Setup
The researcher was working with Burp Suite as an intercepting proxy. No specific versions, accounts or roles beyond a normal hacker account and a test account are described. The precondition for the whole chain is simply that a user opens Intigriti and the embedded chat loads: the chat script is embedded in the Intigriti domain, a request is made to the third-party chat application to obtain a secret key, and that secret key is then used to fetch the chat information.
Finding it
The researcher noticed a domain in Burp Suite that was different from www.intigriti.com and had not been searched before. Inspecting the request showed it belonged to the third-party chat application used by Intigriti. While typing in the chat, muscle memory led to inserting a payload instead of text:
<img src=x onerror=alert()>
The payload rendered unusually, so the request was intercepted and tested for XSS. After a few minutes of testing, the backtick character used for Markdown code blocks stood out as the interesting part. Placing the payload inside a backtick-delimited block produced execution:
<svg onload=alert(document.domain)>
Exploitation
Step 1: The first report and the false positive
The researcher reported the XSS to Intigriti. The team replied that it was a false positive: the chat communicates via WebSockets, Burp intercepts both the message from and the message to the WebSocket server, and the researcher was modifying the message coming from the server, which an attacker cannot interfere with. The delay in sanitising that the researcher described was simply the WebSocket refreshing information automatically. The team asked for a way to make the payload stored, meaning it should still appear after a refresh, and closed the report as N/A without affecting reputation.
At that point the researcher did not know how WebSockets worked. Reading up on them revealed that instead of intercepting and modifying the request, the payload could be inserted directly into the chat, with the same result. During the interaction with the team it became clear that the payload was only reflected in the researcher's own chat, while on the other end it was rendered as text. The researcher says this self-XSS ended up being worth €500.
Step 2: Looking for a way to reach other users
The open question was how to make the bug severe. The self-XSS only reflected on the sender's side. The idea was to steal another hacker's chat and insert a payload there, so that the payload would be delivered to that user.
Step 3: Understanding chat authentication
Intigriti embeds the third-party chat application's script in its domain to load the chat. A request is made to the third-party chat application to get a secret key, and that secret key is used to fetch the chat information. The application has to map the key to the user somehow. Looking at the request that fetches the secret key, the researcher saw a visitorId parameter containing a hash, which is used to fetch the secret key. Changing the hash to the test account's hash worked.
Step 4: The second report and the entropy argument
The researcher reported this, and the team replied that they were aware of it: the visitorId has a large entropy and is not easily brute-forceable, so an attacker cannot simply guess it. If an attacker managed to steal the visitor ID, they would also be able to steal the chats and probably more. The team asked why the issue had been marked critical, explained what critical means, and closed it unless a way to steal or guess a visitor ID could be provided.
The researcher's takeaways from this exchange were: think about the severity before tagging a bug; large entropy values cannot be brute-forced, although what counts as large differs from person to person and depends on the number of iterations needed to guess the right value; and a better report leads to faster triage.
Step 5: Stealing the hash through IDOR
Since brute force was out, the next step was to find a request that returns the hash in its response. Such a value should have been generated from user data such as email, username or userId. The researcher tampered with every parameter in the request that affected the hash in the response, and found that the hacker's username is used to retrieve the hash, with no other authorisation checks. Usernames can be found on the Intigriti leaderboard.
Using the username of the top hacker on the leaderboard, the researcher was able to steal that hacker's chat and post in it as that user.
Step 6: Delivering the payload
The payload was inserted into the stolen chat. When the hacker opens Intigriti, a request is sent to fetch and render the chat, and the XSS fires without any user interaction.
Root cause
The chat authentication flow trusted a user-supplied visitorId hash to fetch the secret key, and the hash itself could be retrieved by supplying a username, with no authorisation check tying the request to the authenticated user. The entropy of the hash protected against guessing but not against a lookup that returns it. On the rendering side, the Markdown handling of backtick code blocks allowed HTML to be rendered rather than escaped, which is what made the injected payload execute. The original report does not show the vulnerable code, so the exact mechanism is likely a combination of missing authorisation on the hash lookup and insufficient output encoding in the Markdown renderer.
Impact
An attacker who knows a victim's username, which is public on the Intigriti leaderboard, could obtain that user's chat hash, read their chat and post messages as them. Injecting HTML into the victim's chat resulted in HTML injection in the victim's session when they opened Intigriti, with no user interaction. Intigriti rated this high rather than critical: in some cases it could lead to XSS on older browsers or when CSP is not enabled. The team paid €3,000 in total, described as their current critical payout: €1,500 for INTIGRITI-9115R1 and €1,500 for INTIGRITI-IKIN5J, taking the chat authentication issue into account when assessing total severity.
Fix
Intigriti disabled the chat the very next day, and later said it had contacted the third-party vendor. The team said the investigation was ongoing, that they could not give permission to blog or disclose details with third parties at that moment because the issue appeared to be in a third-party plugin, and that they would take steps to prevent this kind of attack and keep the plugin disabled or replaced until a proper solution was found.
Variants to test
- Look for third-party widgets embedded in a target's domain and inspect their authentication requests in Burp. A positive result is a request whose response contains a secret or token derived from a parameter you control.
- Take any identifier used to fetch a secret and swap it for another account's value. A positive result is a valid secret for the other account.
- Look for a separate request that returns the identifier itself, keyed on a public value such as a username, email or userId. A positive result is the identifier of another user appearing in the response without an authorisation check.
- Test Markdown renderers with backtick code blocks containing HTML payloads, such as
<svg onload=alert(document.domain)>. A positive result is execution rather than escaped text. - Check whether a payload inserted into a chat or comment is rendered for the recipient without interaction when they load the application. A positive result is execution on the recipient's side after a refresh or a new session.
- When a team rejects a finding because of entropy, look for a lookup path that returns the high-entropy value instead of guessing it. A positive result is the value appearing in a response to a request you can replay for other users.
What happened, in plain words
A security researcher found two bugs in a chat widget that the bug bounty platform Intigriti embeds in its website. The first bug let a person type special text into the chat that made the chat run code in their own browser. On its own that is not very useful, because you can only attack yourself. The second bug was in the way the chat logs you in: the chat trusted a value that the website sent it, and that value could be looked up for any user just by knowing their username. Usernames are public on the Intigriti leaderboard. Put together, the researcher could take over another hacker's chat, post a message containing the special text, and have that text run in the victim's browser as soon as the victim opened Intigriti. Intigriti paid €3,000 in total and disabled the chat the very next day.
The story is told around three ideas: Markdown, WebSockets and reflected XSS. Each one is explained below from scratch before it is used.

The three ideas you need first
Markdown
Markdown is a way of writing plain text with a few extra symbols so that it can later be displayed with formatting. You have almost certainly used it without knowing: when you write **hello** in a chat and it appears as hello, or when you start a line with # and it becomes a heading, that is Markdown. Bug bounty platforms such as Intigriti, Bugcrowd and HackerOne let you write reports in Markdown because it makes long reports easier to read.
Two pieces of Markdown matter here:
#at the start of a line makes a heading.- A backtick, the small slanted quote character
`, is used to mark text as code. Text between two backticks is supposed to be shown exactly as written, not interpreted.
The chat in this story supported Markdown, including backticks. That detail becomes the key to the first bug.
WebSockets
A normal web page works like this: your browser asks the server for something, the server answers, and the conversation is over. If you want new information, your browser has to ask again. That is fine for reading an article, but it is clumsy for a chat, where new messages can arrive at any moment.
A WebSocket is a connection that stays open. Your browser and the server keep a two-way line between them, and either side can send a message at any time without being asked. Chat applications use WebSockets for exactly this reason. Think of the difference between sending letters (normal HTTP: you post a letter, you get a reply, done) and keeping a phone call open (WebSocket: either person can speak whenever they like).
This matters for the story because a tool the researcher used, Burp Suite, can see and change messages travelling in both directions on that open line. Changing a message that the server is sending to you proves nothing about what other users would see.
Reflected XSS
XSS stands for cross-site scripting. It means getting a website to run JavaScript code that the website's authors did not intend. JavaScript is the programming language that runs inside your browser and makes pages interactive. If an attacker can make a site run their JavaScript, that code runs with the site's permissions: it can read what the page shows, act as the logged-in user, and so on.
Reflected XSS is the simplest kind. The site takes a value from the request, for example from the address bar, and puts it straight into the page it sends back, without cleaning it. The value is not saved anywhere; it just bounces back once. The report gives this example:
https://www.ladecruze.com/blogs?query=xss<img src=x onerror=alert(document.domain)>
Line by line:
https://www.ladecruze.com/blogsis the page being visited.?query=starts the part of the address that carries data to the server. Everything after the?is a list of name and value pairs. Here the name isquery.- The value is
xss<img src=x onerror=alert(document.domain)>. The first part is ordinary text. The second part is an HTML tag:<img>tells the browser to load an image,src=xpoints it at a file calledxthat does not exist, andonerror=alert(document.domain)says: if loading that image fails, run this JavaScript.alert(document.domain)pops up a box showing the domain of the current page, which is a harmless way of proving that code ran.
If the site pastes that value into its reply without cleaning it, the browser does not see text, it sees an instruction. The report shows the kind of reply that would be dangerous:
<html>
<body>
Sorry, we have not found <img src=x onerror=alert(document.domain)>
</body>
</html>
Line by line:
<html>and<body>are the outer structure of any web page.Sorry, we have not foundis the site's own text.- Then comes the value from the address bar, unchanged. Because it was not escaped (turned into harmless display text), the browser treats
<img ...>as a real image tag and runs theonerrorcode when the image fails to load. </body>and</html>close the page.
That is reflected XSS: input goes in, comes back in the response, and the browser executes it.
How the researcher found the chat
The researcher was using Burp Suite. Burp Suite is a program that sits between your browser and the internet and lets you read and edit every request and response. It is the standard tool for this kind of work.
While browsing, the researcher noticed a domain in Burp Suite that was not www.intigriti.com and had not been looked at before. Opening the request showed it belonged to a third-party chat application that Intigriti embeds in its site. Hackers use that chat to contact Intigriti support. A third-party application here means a chat product made by another company and dropped into Intigriti's pages, the way a site might embed a map or a video player made by someone else.
While typing in the chat, habit took over and the researcher typed a payload instead of a normal message:
<img src=x onerror=alert()>
Line by line:
<imgstarts an image tag.src=xsays the image is at a location calledx, which does not exist.onerror=alert()says: when loading fails, runalert(), which opens an empty pop-up box. It is the smallest possible proof that JavaScript ran.
The chat displayed the message in an odd way, which suggested the text was being treated as HTML rather than as plain text. So the researcher intercepted the request in Burp Suite and started testing for XSS properly. Intercepting means pausing a request or response inside Burp Suite, looking at it, changing it if you want, and then letting it continue.
After a few minutes of testing, one character stood out: the backtick used for Markdown code blocks. Putting the payload inside a backtick-delimited block made it execute:
<svg onload=alert(document.domain)>
Line by line:
<svgstarts an SVG element. SVG is a format for drawing shapes on a web page.onload=alert(document.domain)says: when this element has finished loading, run this JavaScript.document.domainis the domain of the page, so the pop-up proves which site the code is running on.>closes the tag.
The reason the backtick mattered is that the chat's Markdown handling treated the contents of a code block in a way that let HTML through instead of showing it as text. The report does not include the chat's source code, so the exact mechanism is not shown; what is shown is that wrapping the payload in backticks made it run.
First report: a false positive
The researcher reported the XSS to Intigriti. The team replied that it was a false positive. A false positive is a report that looks like a bug but is not one, because the thing the reporter observed cannot actually be done by a real attacker.
Their reasoning: the chat communicates over WebSockets, and Burp Suite intercepts messages in both directions, from the browser to the server and from the server to the browser. The researcher had been changing the message coming from the server. An attacker on the internet cannot reach into that message; only the server sends it. The delay in cleaning up the text that the researcher described was simply the WebSocket refreshing the chat automatically, which is how WebSockets behave. The team asked for proof that the payload could be stored, meaning it should still be there after a refresh, and closed the report as N/A (not applicable) without affecting the researcher's reputation score. Reputation is a score platforms keep for researchers; bad reports can lower it.
At that point the researcher did not know how WebSockets worked. After reading up, the lesson was simple: instead of intercepting and editing the request, the payload could be typed directly into the chat, with the same result. Talking with the team also made clear what was really happening: the payload was only reflected in the researcher's own chat window. On the other person's side it appeared as ordinary text. The researcher says this self-XSS ended up being worth €500.
Self-XSS means exactly this: the code only runs for the person who typed it. It is like a magic trick you perform on yourself. On its own it is worth little, which is why the payment was modest.
Step 2: turning a self-XSS into an attack on others
The open question was how to make the bug serious. The self-XSS only affected the sender. The idea that followed: steal another hacker's chat, insert the payload there, and the payload would be delivered to that other person instead.
Step 3: how the chat logs you in
To understand the next bug you need to know roughly how a chat widget knows who you are. When you log in to a website, the site usually gives your browser a small piece of data, often called a token or a cookie, that your browser sends back with every request so the site can recognise you. A token is like a cloakroom ticket: it is not your identity, but whoever holds it is treated as you. That is why tokens are secrets.
Intigriti embeds the third-party chat application's script in its own domain to load the chat. A request is then made to the third-party chat application to get a secret key, and that secret key is used to fetch the chat information. So the chain is: page loads, script asks the chat service for a key, the key is used to read and write the chat.
For this to work, the chat service has to map the key to a particular user. Looking at the request that fetches the secret key, the researcher saw a parameter called visitorId containing a hash. A parameter is a named value sent with a request, like the query in the earlier address bar example. A hash here means a long string of characters that stands in for a user, hard to guess because there are so many possible values. The visitorId was being used to fetch the secret key.
The researcher changed the hash to the hash of a test account, and it worked: the request returned a valid key for that other account. That is the second bug in one sentence: the chat service handed out a key for whichever visitorId you asked for, without checking that you were that user.
Step 4: the second report and the entropy argument
The researcher reported this. The team replied that they were already aware of it. Their argument was entropy. Entropy, in this context, means how unpredictable a value is: how many possible values there are and how evenly they are spread. The visitorId had a large entropy, so it could not easily be brute-forced. Brute force means trying every possible value until one works, like trying every combination on a padlock. If there are enough possibilities, trying them all takes too long to be practical. The team added that if an attacker did manage to steal a visitor ID, they would also be able to steal the chats and probably more. They asked why the researcher had marked the issue as critical, explained what critical means (people have to stop what they are doing and look at this right now), and closed the report unless a way to steal or guess a visitor ID could be provided.
The researcher took three lessons from this exchange:
- Think about severity before labelling a bug. Severity is how much damage a bug could do; labelling everything critical makes reports less credible.
- Large entropy values cannot be brute-forced. What counts as large varies from person to person and depends on how many attempts would be needed to find the right value.
- A better report leads to faster triage. Triage is the team's first pass over a report to decide whether it is real and how serious it is.
Step 5: stealing the hash instead of guessing it
Brute force was out. So the next question was different: is there a request that simply returns the hash in its response? If the hash is generated from user data such as an email address, a username or a userId, then some request probably takes that data and hands back the hash.
The researcher tampered with every parameter in the request that affected the hash in the response. Tampering means changing one value at a time and watching what changes in the reply. The finding: the hacker's username is used to retrieve the hash, and there are no other authorisation checks. Authorisation is the check that asks whether you are allowed to do this; authentication is only about who you are. Here the service checked nothing at all. Usernames, meanwhile, are public on the Intigriti leaderboard.
Using the username of the top hacker on the leaderboard, the researcher was able to steal that hacker's chat and post in it as that user. This class of bug is called IDOR, insecure direct object reference: the application takes a value you supply (here, a username) and uses it to reach an object directly (here, another user's chat key), without checking that the object belongs to you. The everyday comparison is a hotel where the room number in the booking form is all that matters: change the number and you get someone else's room.
Step 6: delivering the payload
The payload was inserted into the stolen chat. When the hacker opens Intigriti, the page sends a request to fetch and render the chat, and the XSS fires without any user interaction. No link to click, no file to open: simply loading the site is enough. That is what makes this chain serious, and it is why the earlier self-XSS mattered after all.
Why it worked
Two weaknesses combined. On the login side, the chat authentication flow trusted a user-supplied visitorId hash to fetch the secret key, and the hash itself could be retrieved by supplying a username, with no authorisation check tying the request to the logged-in user. The entropy of the hash protected against guessing but not against a lookup that returns it. On the display side, the Markdown handling of backtick code blocks allowed HTML to be rendered rather than escaped, which is what made the injected payload execute. The report does not show the vulnerable code, so the exact mechanism is likely a combination of missing authorisation on the hash lookup and insufficient output encoding in the Markdown renderer. Output encoding means turning characters like < into harmless display text so the browser never treats them as instructions.
What it meant in practice
An attacker who knows a victim's username, which is public on the Intigriti leaderboard, could obtain that user's chat hash, read their chat and post messages as them. Injecting HTML into the victim's chat resulted in HTML injection in the victim's session when they opened Intigriti, with no user interaction. Intigriti rated this high rather than critical: in some cases it could lead to XSS on older browsers or when CSP is not enabled. CSP, content security policy, is a browser feature that lets a site restrict which scripts may run; with it switched off, injected HTML has an easier time becoming running code.
The team paid €3,000 in total, described as their current critical payout: €1,500 for INTIGRITI-9115R1 and €1,500 for INTIGRITI-IKIN5J, taking the chat authentication issue into account when assessing total severity. The report identifiers are the platform's internal ticket numbers for the two findings.
The fix
Intigriti disabled the affected chat the very next day, and later said it had contacted the third-party vendor. The team said the investigation was ongoing, that they could not give permission to blog or disclose details with third parties at that moment because the issue appeared to be in a third-party plugin, and that they would take steps to prevent this kind of attack and keep the plugin disabled or replaced until a proper solution was found.
Things worth trying on other targets
- Look for third-party widgets embedded in a target's domain and inspect their authentication requests in Burp Suite. A positive result is a request whose response contains a secret or token derived from a parameter you control.
- Take any identifier used to fetch a secret and swap it for another account's value. A positive result is a valid secret for the other account.
- Look for a separate request that returns the identifier itself, keyed on a public value such as a username, email or userId. A positive result is the identifier of another user appearing in the response without an authorisation check.
- Test Markdown renderers with backtick code blocks containing HTML payloads, such as
<svg onload=alert(document.domain)>. A positive result is execution rather than escaped text. - Check whether a payload inserted into a chat or comment is rendered for the recipient without interaction when they load the application. A positive result is execution on the recipient's side after a refresh or a new session.
- When a team rejects a finding because of entropy, look for a lookup path that returns the high-entropy value instead of guessing it. A positive result is the value appearing in a response to a request you can replay for other users.
Glossary
- API: a defined way for one piece of software to ask another for data or actions, like a service counter with set requests you can make.
- Authentication: proving who you are, for example by logging in.
- Authorisation: the check of whether you are allowed to do something, once you are known.
- Brute force: trying every possible value until one works.
- Burp Suite: a tool that sits between your browser and the internet so you can read and edit requests and responses.
- Cookie: a small piece of data a site stores in your browser and gets back on later requests, often used to recognise you.
- Critical: the highest severity label, meaning people should stop and look at the issue immediately.
- CSP (content security policy): a browser feature that lets a site restrict which scripts may run on its pages.
- Entropy: how unpredictable a value is; more possible values, more evenly spread, means higher entropy.
- Escaping / output encoding: turning characters like
<into harmless display text so the browser does not treat them as instructions. - False positive: a report that looks like a bug but cannot actually be exploited by a real attacker.
- Hash: a long string of characters derived from data, used here as a stand-in identifier for a user.
- HTML: the language that describes the structure of a web page, including tags like
<img>and<svg>. - HTML injection: getting your own HTML into a page, which may or may not lead to running code.
- IDOR (insecure direct object reference): a bug where the application uses a value you supply to reach an object directly, without checking that it is yours.
- Intercept: pause a request or response in a proxy tool, inspect or change it, then let it continue.
- JavaScript: the programming language that runs inside your browser and makes pages interactive.
- Markdown: a lightweight way of writing plain text with symbols that later become formatting, such as
#for headings and backticks for code. - N/A (not applicable): a report status meaning the issue does not qualify as a bug.
- Parameter: a named value sent with a request, such as
queryin an address bar orvisitorIdin a request. - Payload: the piece of input an attacker sends to try to trigger a bug.
- Reflected XSS: cross-site scripting where the input bounces back once in the response and is not stored.
- Reputation: a score platforms keep for researchers, affected by the quality of their reports.
- Self-XSS: code that only runs for the person who typed it, so it cannot be used against anyone else.
- Severity: how much damage a bug could do, usually expressed as a label such as low, medium, high or critical.
- SVG: a format for drawing shapes on a web page, written with tags like
<svg>. - Third-party application: software made by another company and embedded in a site, such as a chat widget.
- Token / secret key: a piece of data that proves you are logged in; whoever holds it is treated as you, so it must stay secret.
- Triage: the team's first pass over a report to decide whether it is real and how serious it is.
- WebSocket: a connection between browser and server that stays open, so either side can send messages at any time; used by chat applications.
- XSS (cross-site scripting): getting a website to run JavaScript that its authors did not intend.