**Spoofing Super Admins: An IDOR Vulnerability in Enterprise Message Forwarding** *By Savan Chotaliya*
The message forwarding endpoint trusted a client-supplied field naming the original sender, so any user could set it to another account's ID. An attacker could make forwarded messages appear to come from a Super Admin or any other user, enabling internal phishing and impersonation.
Cybersecurity
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
During a bug bounty engagement on a corporate workspace platform, I found an Insecure Direct Object Reference (IDOR) in the message forwarding endpoint. The feature lets a user take a message from one chat and forward it to another recipient. After the tampered request, the recipient saw the Super Admin's name as the original sender of the forwarded text.
The flaw was in how the server decided who that original sender was. It trusted a client-supplied parameter, forwardedFrom, instead of deriving the identity from the authenticated session. By changing that one value, I could make a message appear to have been forwarded by a Super Admin, or by any other user in the organisation.
Setup
The engagement was against a corporate workspace platform with organisational accounts and roles, including Super Admins. I used a low-privileged account of my own and Burp Suite to intercept and modify the API traffic. The report does not name the platform, the endpoint path, or any software versions.
The only precondition was a normal authenticated session and access to the messaging and forwarding features. No special role was needed on the attacking side.
Finding it
To spoof a user, I first needed that user's internal account ID. The application exposed it during ordinary messaging. When I started a standard chat with any user in the organisation, the HTTP request and response traffic plainly revealed the recipient's internal user_id.
That gave a reliable way to harvest the IDs of high-privilege accounts such as Super Admins: send them a direct message, or pull their profile from the corporate directory, and read the ID from the traffic.
Exploitation
With a target Super Admin ID in hand, I moved to the message forwarding feature and routed my web traffic through Burp Suite to intercept the API calls.
Step 1: Initiate forwarding
I selected a benign message in my own chat, clicked the "Forward" button and chose a test recipient.
Step 2: Intercept the request
In Burp Suite I caught the outbound HTTP POST request directed at the forwarding endpoint.
Step 3: Modify the parameter
The JSON payload included the vulnerable parameter:
"forwardedFrom": "my_own_user_id"
This field tells the server which user the forwarded message should be attributed to. The server accepted the value supplied by the client.
Step 4: Execute the spoof
I replaced my own user ID with the harvested Super Admin ID and forwarded the modified request to the server.
The application processed the tampered request without checking whether the active session matched the forwardedFrom value. The recipient received the message, and the UI displayed the Super Admin's name as the original sender of the forwarded text.
Root cause
The server took the identity of the forwarder from a client-supplied JSON field, forwardedFrom, and used it for display without validating it against the authenticated session. The server did not check whether the active session matched the forwardedFrom value, so the tampered ID was accepted.
Because the value is a plain object reference rather than a secret, the only thing standing between an attacker and any user's identity was the ability to learn that user's user_id. The messaging and directory features handed those IDs out during normal use, so that barrier did not exist.
Impact
This is a logic flaw with a severe internal social engineering and phishing risk. An attacker holding a low-level compromised account could use it to:
- Spoof IT administrators requesting sensitive credentials or immediate password resets.
- Impersonate executives directing finance teams to approve fraudulent wire transfers.
- Distribute malicious links under the guise of an urgent, mandatory company-wide IT update.
The attack requires an authenticated account and the target's user_id, which the messaging and directory features revealed during normal use. The report does not describe any external-facing impact beyond the organisation's own users.
Fix
The development team must move trust away from client-supplied data and enforce strict server-side validation on the forwarding endpoint.
- Enforce session-based authorisation: the server must ignore the
forwardedFromparameter in the client request and instead extract the sender's identity directly from the authenticated session token (for example a JWT or session cookie) of the user making the request. - Implement server-side lineage tracking: if the application needs to display the original author of a forwarded message, it should query the database for the original message ID rather than trusting the client to declare who the author is.
- Audit API endpoints for object references: ensure that every API endpoint explicitly verifies that the user invoking the action has the correct permissions to perform that action on the requested data object.
Variants to test
- Other attribution fields: look for parameters such as
senderId,authorId,createdByoronBehalfOfin message, comment, ticket and notification APIs. A positive result is a stored object whose displayed author differs from the session user. - Forwarding and sharing endpoints: test forward, share, quote and reply-to features on chat, email and document platforms. A positive result is a forwarded item shown as coming from a user whose ID you supplied.
- ID harvesting surfaces: check chat initiation, directory search and profile endpoints for
user_idvalues in requests or responses. A positive result is a reliable way to map names or roles to internal IDs. - Role-bearing objects: try substituting IDs of administrators or service accounts in any endpoint that accepts an object reference. A positive result is an action or display attributed to the higher-privileged account while your own session remains low-privileged.
What happened, in plain words
I was taking part in a bug bounty programme. A bug bounty is an arrangement where a company invites outside researchers to look for security problems in its systems and pays them for reporting what they find, instead of punishing them. The target was a corporate workspace platform: software that organisations use for day-to-day work, with accounts and different levels of permission, including a top level called Super Admin.
While testing the message forwarding feature, I found a way to make a message look as though it had been forwarded by somebody else, including a Super Admin. Forwarding is the ordinary chat feature where you take a message from one conversation and pass it on to another person. After the tampered request, the platform showed the recipient the Super Admin's name as the original sender of the forwarded text.
The problem was that the server, the computer that runs the platform, did not work out for itself who was forwarding the message. It asked the browser. The browser sent along a small piece of data saying "this was forwarded by user X", and the server simply believed it. By changing that value before it left my computer, I could put the harvested Super Admin ID there and the platform displayed that person's name to the recipient.
This kind of mistake has a name: Insecure Direct Object Reference, usually shortened to IDOR. A "direct object reference" means that one piece of software points at a piece of data by using its internal identifier, for example "user number 1234". "Insecure" means the server does not check whether the person making the request is allowed to use that identifier. A simple comparison: imagine a cloakroom where you hand in a ticket with a number on it, and the attendant gives you whatever coat matches the number you say, without checking that the ticket is really yours. If you can guess or read other people's numbers, you can walk away with their coat.
I used only a normal, low-privileged account of my own. I did not need any special role on the attacking side. The report does not name the platform, the exact address of the forwarding endpoint, or any software versions.
The tools and ideas you need first
A few terms come up constantly below, so here they are from zero.
- API: an API (Application Programming Interface) is the set of private doorways a web page uses to talk to the server behind it. When you click a button in a chat app, the page does not reload; it quietly sends a small request to one of these doorways, and the server sends back an answer. Think of the web page as a waiter and the API as the kitchen door: the waiter takes your order through it and brings back the plate.
- HTTP request: the message the browser sends to the server. It has a method (such as
GETto fetch something orPOSTto send something), an address, and often a body containing data. - JSON: a simple text format for structured data, made of names and values in curly braces, like
{"name": "value"}. APIs commonly send and receive data in this format. - Session: the server's memory of who you are after you log in. Your browser holds a small proof of that login, and sends it with every request.
- Session cookie or token: that proof. A cookie is a small piece of text the site stores in your browser; a token (for example a JWT, JSON Web Token) is a similar piece of text, often sent in a header. Either way it is like the wristband you get at an event: the staff check the wristband, not your word, to decide what you are allowed to do.
- Burp Suite: a tool used in security testing that sits between your browser and the server, like a post office that opens every letter, lets you read it, change it, and then sends it on. It can pause a request so you can edit it before it reaches the server.
- Parameter: one named value inside a request, such as
forwardedFrombelow. It is a labelled field in a form. user_id: the platform's internal number or code for a particular account. It is not a password; it is just a label, like a student number.- Super Admin: the highest permission level in the organisation's account, able to administer other users and settings.
Finding the target user ID
To make a message look as though it came from a particular person, I first needed that person's internal account ID. The platform handed it out during completely ordinary use. When I started a normal chat with any user in the organisation, the request and response traffic plainly showed the recipient's internal user_id.
Why does this matter? Because the spoofing trick depends entirely on knowing the victim's ID. If IDs were secret, the trick would be much harder. They were not secret: they travelled in normal traffic, visible to anyone who looked.
That gave a dependable way to collect the IDs of high-privilege accounts such as Super Admins. Two easy routes: send the person a direct message, or look them up in the corporate directory (the organisation's list of employees and profiles), and read the ID from the traffic. No guessing, no brute force, just reading what the platform already told me.
The exploit, step by step
With a Super Admin's ID in hand, I went to the message forwarding feature and routed my web traffic through Burp Suite so I could intercept the API calls.
Step 1: Start a forward
I picked a harmless message in my own chat, clicked the "Forward" button and chose a test recipient. This is exactly what any employee would do. The point was to make the platform produce a genuine forwarding request that I could then catch and edit.
Step 2: Catch the request
In Burp Suite I intercepted the outgoing HTTP POST request aimed at the forwarding endpoint. POST is the method used when the browser is sending data to the server to create or change something, here a forwarded message. Intercepting it means Burp held the request before it left my machine, so I could inspect and alter it.
Step 3: Change the parameter
The JSON body of the request contained the vulnerable field:
"forwardedFrom": "my_own_user_id"
Line by line, in plain words:
- The outer curly braces of the JSON body (not shown in this snippet) group the fields of the request together.
"forwardedFrom"is the name of the field. It tells the server which user the forwarded message should be credited to.- The colon separates the name from its value.
"my_own_user_id"is the value: in the real request this was my own account's ID, written as text inside quotes. The report shows it here as a placeholder rather than the actual number.
The server did not check whether the logged-in session matched this value.
Step 4: Send the spoofed request
I replaced my own user ID with the Super Admin ID I had collected, and let the modified request go to the server.
The server processed the altered request without checking whether the logged-in session matched the forwardedFrom value. The recipient got the message, and the interface showed the Super Admin's name as the original sender of the forwarded text.
That is the whole attack. No password was cracked, no server was broken into. One value in one request was changed, and the platform presented a false author as fact.
Why it worked
The server took the identity of the forwarder from a field the client supplied, forwardedFrom, and used it for display without checking it against the logged-in session. The server did not check whether the logged-in session matched the forwardedFrom value, so the tampered ID was accepted.
Because the value is just a reference to an object, a label rather than a secret, the only obstacle between an attacker and any user's identity was knowing that user's user_id. The messaging and directory features gave those IDs away during normal use, so even that obstacle was not really there.
A useful comparison: a hotel receptionist who writes down whatever room number a caller claims, instead of checking the guest list, will connect calls to the wrong rooms all day. The guest list exists; nobody consulted it.
What an attacker could do with it
This is a logic flaw, meaning the software does what it was programmed to do but the rule itself is wrong. The risk is severe internal social engineering and phishing. Social engineering means manipulating people into doing something against their interest, and phishing is its most common form: a message that pretends to come from someone trusted in order to extract information or trigger an action. An attacker holding a low-level compromised account, for example a stolen ordinary employee login, could use the flaw to:
- Spoof IT administrators asking for sensitive credentials or immediate password resets.
- Impersonate executives telling finance teams to approve fraudulent wire transfers.
- Spread malicious links under the cover of an urgent, mandatory company-wide IT update.
Each of these works because the message appears to come from someone with authority. The attack needs an authenticated account and the target's user_id, which the messaging and directory features revealed during normal use. The report does not describe any impact outside the organisation's own users.
How to fix it
The development team has to stop trusting data supplied by the client and enforce strict checks on the server.
- Enforce session-based authorisation: the server must ignore the
forwardedFromparameter in the client request. Instead it should take the sender's identity directly from the authenticated session token (for example a JWT or session cookie) of the user making the request. In other words, read the wristband, not the claim. - Implement server-side lineage tracking: if the platform needs to show the original author of a forwarded message, it should look up the original message by its ID in the database rather than letting the client declare who the author is. The database is the guest list; consult it.
- Audit API endpoints for object references: make sure every API endpoint explicitly checks that the user performing an action has the right permission to perform it on the specific piece of data involved. An audit here means a systematic review of all the doorways, not just this one.
Similar things to test elsewhere
Once you know the pattern, you can look for it in other places. These are the variants worth trying.
- Other attribution fields: look for parameters such as
senderId,authorId,createdByoronBehalfOfin message, comment, ticket and notification APIs. A positive result is a stored item whose displayed author differs from the logged-in user. - Forwarding and sharing endpoints: test forward, share, quote and reply-to features on chat, email and document platforms. A positive result is a forwarded item shown as coming from a user whose ID you supplied.
- ID harvesting surfaces: check chat initiation, directory search and profile endpoints for
user_idvalues in requests or responses. A positive result is a reliable way to map names or roles to internal IDs. - Role-bearing objects: try substituting the IDs of administrators or service accounts in any endpoint that accepts an object reference. A positive result is an action or display credited to the higher-privileged account while your own session stays low-privileged.
Glossary
- API: the set of doorways a web page uses to exchange data with the server behind it.
- API endpoint: one specific address within an API that performs one specific job, such as forwarding a message.
- Attribution field: a field in a request that says who an item should be credited to.
- Audit: a systematic review of a system to find problems.
- Authorisation: the decision about what a logged-in user is allowed to do.
- Bug bounty: a programme where a company rewards outside researchers for reporting security flaws.
- Burp Suite: a tool that sits between browser and server so requests can be inspected and modified.
- Client: the browser or app on the user's side, as opposed to the server.
- Cookie: a small piece of text a site stores in your browser, often used to prove you are logged in.
- Corporate directory: the organisation's list of employees and their profiles.
- Database: the organised store where the server keeps its data, such as messages and user records.
- Direct object reference: pointing at a piece of data by its internal identifier, such as a user ID.
- Forwarding: passing a message from one conversation on to another recipient.
- HTTP: the protocol browsers and servers use to exchange requests and responses.
- IDOR (Insecure Direct Object Reference): a flaw where the server accepts an identifier from the client without checking the client is allowed to use it.
- JSON: a text format for structured data made of names and values.
- JWT (JSON Web Token): a token format often used to carry proof of a login.
- Logic flaw: a mistake in the rules the software follows, rather than a coding crash.
- Parameter: a named value inside a request.
- Phishing: a message pretending to come from someone trusted in order to extract information or trigger an action.
- POST: the HTTP method used to send data to the server to create or change something.
- Privilege: the level of permission an account has.
- Request: the message a browser sends to a server.
- Response: the message a server sends back.
- Server: the computer that runs the platform and holds its data.
- Server-side validation: checking data on the server, where the user cannot tamper with the check.
- Service account: an account used by software rather than a person.
- Session token: the proof of that login, sent with each request.
- Social engineering: manipulating people into acting against their interest.
- Super Admin: the highest permission level in an organisation's account.
user_id: the platform's internal identifier for an account.- Variant: a different place or form where the same kind of flaw may appear.
- Wire transfer: a bank transfer of money from one account to another.