Dank Writeup On Broken Access Control On An Indian Startup
The support ticket creation endpoint lacked access control, allowing an attacker to create tickets on behalf of other users by changing the email and cell values. Additionally, the file upload feature did not properly validate file extensions, enabling the upload of executable files that could be downloaded by support staff or other users.
Published on medium.com
{{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 write-up covers two issues found together in the customer support feature of an Indian startup: broken access control on ticket creation and an unrestricted file upload on the attachment field. The company had run a bug bounty programme for a long time, and the researcher deliberately targeted the main application, which had already been tested many times. Under the programme's non-disclosure policy the application server is referred to as example.com.
The feature itself is ordinary: a help and support page where a user opens a ticket, answers a short set of questions, describes the problem and attaches a screenshot that a customer support executive will later view. The researcher notes that the issue was acknowledged but neither rewarded nor followed up with feedback, and no hall of fame entry was made.
Setup
The report does not describe any special accounts, roles or tooling. The only precondition is access to the public support flow, plus an intercepting proxy to modify the ticket submission request before it reaches the API. The captured request carries a Firefox 66.0 on macOS 10.14 User-Agent.
Finding it
The support page accepts an attachment described as a screenshot, so the natural question is whether the server actually enforces that. The second question is who the ticket belongs to: the request carries the reporter's email and cell number as ordinary form fields, which suggests the server may trust whatever values the client sends rather than deriving the identity from the session.
Both suspicions turned out to be correct. The extension check on the image could be bypassed, and a ticket could be created on behalf of another user. Because support staff open these tickets, a file attached to one is opened by a person whose job is to look at it.
Exploitation
Step 1: reach the support form
Visit the support page:
https://www.example.com/help/support
Step 2: walk the question flow
Select a category such as services. The page asks a few questions before the final request is sent.
Step 3: get to the chat window
Select the right answer and then answer no, which opens the customer support chat window.
Step 4: prepare the content and the file
Type malicious content or post a malicious link, and attach any .exe, .dmg or .ps1 file. The form presents this as an image attachment.
Step 5: intercept and change the identity
Hit submit and intercept the request. Change the value of email and cell, which the researcher notes can be easily brute-forced for any existing user. The full request as captured:
POST /p/account/tickets/v3/tickets HTTP/1.1
Host: api.example.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://www.example.com/
Authorization: [redacted]
Content-Type: multipart/form-data; boundary=---------------------------163405244814986157001545857884
Content-Length: 6096
Origin: https://www.example.com/
DNT: 1
Connection: close
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="category"
XXXXXservice
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="cell"
9999999999
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="email"
[redacted]
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="quesHistory"
[{"key":"initialiserView","value":"{\"greetings\":\"XXXX from XXXXX\",\"hi\":\"Hi YYYY!\",\"question\":\"Are you facing problem with any of these services ?\",\"problem\":\"What are the problems you are facing\"}"},{"key":"questionView","value":"Are you facing problem with any of these services ?"},{"key":"userView","value":"XXXXXX"},{"key":"questionView","value":"Select the query we can help you with !"},{"key":"userView","value":"How can I download my xxxxxxx ?"},{"key":"answerView","value":"{\"answerTextBody\":\"1. Click on the 'xxxx' option on the xxxxx. \\n2."},{"key":"userView","value":"no it did not solve my query "}]
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="mild"
null
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="ticketstate"
1
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="query"
MALICIOUS POST AND URL AND OTHER DETAILS
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="resolve"
N
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="attachments"; filename="SHELL.EXE"
Content-Type: image/png
PNG
IHDR
/î@ IiCCPICC ProfileHWXSÉ[RIhH Ò«Z© J AÄβ¬k°¡«”®µ¢®uì®å¡,*+ëbÁÊX×ýÞ{ß;ß7÷þ9sÎJæÞ;N-O*ÍCuÈÈCYÓÒY¤n hS`ÌãË¥ìøøeøþwysZC¹æ¢äúçü= PÎ8S
MALICIOUS CONTENTXXXXXXXXXX
-----------------------------1634051111111111545857884--
The parts that matter:
Authorizationcarries the session token, whileemailandcellare ordinary body fields; changing those two values produced a ticket in the victim's account.attachmentsis sent withfilename="SHELL.EXE"while the part'sContent-Typeis declared asimage/png. The extension check on the image could be bypassed, so the executable file was uploaded.queryholds the malicious text or URL that the support executive will read.ticketstate,resolve,mildandquesHistorycarry the state of the question flow;quesHistoryis a JSON array of the questions and answers shown to the user.

The captured POST to customer support, showing the multipart body with the identity fields and the attachment part.
Step 6: upload a test file
The attachment section is meant for an image, but with no validation check any file can be uploaded. The researcher uploaded a non-malicious EICAR file to demonstrate this.

The malicious file uploaded through the POST request, with the executable filename and the image content type.
Step 7: confirm the ticket on the victim
Submit the request and check the victim's account: the ticket has been created there.
Step 8: make the file downloadable
To download the file, a valid session is needed. The researcher's point is that an attacker can host any website, upload content and give the link as example.com app/download to make a phishing page and get users to download the file, abusing the nature of this vulnerability.

The file download obtained by changing the value of the chat id.
Root cause
The ticket creation endpoint accepted a ticket for another user after the email and cell fields in the multipart body were changed, so the access control on ticket creation is broken. The attachment handling, meanwhile, does not validate the file: a filename ending in .EXE was uploaded despite the image-only attachment field, so the restriction was bypassed.
The report notes that uploaded files are a significant risk when they are .exe or .ps1 files that can carry malware, but that the content-disposition was set as an attachment, so the file could not be executed directly on the server. Execution therefore depends on a user downloading and running the file.
Impact
Any malicious entity can create a ticket on behalf of another user and enter any details, which can cause failure in solving customer issues. Once a ticket is open, the user cannot create a new one for 10 hours because of the restriction on multiple ticket creation.
On the upload side, the attachment is downloadable, so it can be used to share malicious content from a valid website and in phishing emails that point to a download from valid example.com servers. The researcher's stated chain is that an attacker who finds a way to get the code executed can send the malicious file inside the ticket itself; since ticket creation is controlled by the attacker, it can paste the link as a customer care executive, and any user checking the false ticket may download and execute the file. The report hedges this: it is possible that malware may spread across the network and to the clients. The summary given in the report is that the upload is meant for screenshots for the customer support executive, but the failure to restrict file upload combined with ticket creation through broken access control makes malicious malware execution possible once downloaded, and that a user creating a ticket for another user causes loss of integrity and availability of customer support.
Fix
For the broken access control, the report recommends role-based authentication and confirming both server and client while creating a ticket. For the upload, it recommends allowing only specific file extensions using both client-side and server-side validation, allowing only authorised and authenticated users to use the feature, and checking any file fetched from the web for content. The report does not say which of these, if any, the company implemented.
Variants to test
- Identity fields in the body. On any support, feedback or contact form, intercept the submission and change the email, phone or user id fields to another account's values. A positive result is a ticket appearing in the victim's account rather than the attacker's.
- Extension versus declared content type. Send an attachment with an executable filename (
.exe,.ps1,.dmg) and an imageContent-Type. A positive result is the server storing and later serving the file. - Download authorisation. Take the download URL for an attachment and change the chat or ticket id in it. A positive result is the file being served after the id is changed.
- Rate limits as a denial of service. Where a user can only open one ticket per period, create a ticket on their behalf and observe whether they are then blocked from opening their own. A positive result is the victim being unable to submit a genuine request.
- Content-disposition. Check how uploaded files are served. If they are served inline rather than as an attachment, the risk of execution in the browser context is higher than in this report, where the attachment disposition limited it.
What happened, in plain words
A security researcher spent time looking for bugs in the customer support feature of an Indian startup. The company had been running a bug bounty programme for a long time, which is a scheme where a company invites outside people to test its systems and report problems. The researcher deliberately chose the main application, the part that had already been tested many times, because finding something there is harder and more interesting.
He found two problems that worked together. The first is that the support form let anyone create a support ticket in someone else's name. The second is that the file attachment field, which is supposed to accept only a screenshot, accepted any file at all, including an executable program. Because support staff open these tickets as part of their job, a file attached to a ticket is opened by a real person.
The company acknowledged the report but did not pay a reward, did not give further feedback, and did not add the researcher to any hall of fame. Under the programme's non-disclosure policy, the real server name is replaced with example.com throughout.
Before going further, a few words on what the feature actually is. A support ticket is a message a customer sends to a company asking for help. It usually has a subject, a description of the problem, and sometimes a picture attached so the support agent can see what went wrong. The support page here walks the user through a short set of questions first, then opens a chat window where the user describes the problem and attaches a screenshot. When the user presses submit, the browser sends the whole thing to the company's server.
That server is reached through an API. An API is the part of a website that the browser talks to behind the scenes, exchanging data rather than web pages. A useful comparison: the web page is the counter of a shop, and the API is the back room where the actual stock and records live. The browser sends a request to the API, the API does the work and sends back a response. Requests to an API are often sent as POST requests, which is simply the method used when you are sending data to be stored, as opposed to GET, which asks for data to be read.
Setup
The report does not describe any special accounts, roles or tools beyond one: an intercepting proxy. A proxy sits between your browser and the server and lets you pause a request, look at it, change it, and then let it continue. Think of it as a postal worker who, before delivering your letter, shows it to you and lets you rewrite a line before it goes out. Without a proxy you only see the web page; with one you see the actual request the page produces.
The captured request carries a Firefox 66.0 on macOS 10.14 User-Agent, which you can see in the request headers below. Headers are the labelled lines at the top of a request that describe it: who is asking, what format the answer should be in, and so on.
Finding it
The support page says the attachment is a screenshot. The first question the researcher asked was whether the server actually checks that, or whether the check exists only in the web page. A check that lives only in the page is easy to get around, because the page is just something your browser displays; the server is the thing that decides what gets stored.
The second question was about ownership. The request carries the reporter's email address and mobile number as ordinary form fields. That is a hint that the server might trust whatever values the browser sends, instead of working out who you are from your login session. A session is the state of being logged in: after you sign in, the server gives your browser a token, a long string of characters, which the browser sends with every later request so the server knows it is still you. If the server takes your identity from a field you can edit rather than from that token, then you can claim to be anyone.
Both suspicions turned out to be correct. The image extension check could be bypassed, and a ticket could be created on behalf of another user.
Exploitation
Step 1: reach the support form
Visit the support page:
https://www.example.com/help/support
This is just the public help page. Nothing special is needed to reach it; it is the same page any customer would use.
Step 2: walk the question flow
Select a category such as services. The page asks a few questions before the final request is sent. This is a common design: the company tries to solve simple problems with self-service answers before a human gets involved. The researcher went through it because the final request, the one that creates the ticket, is only produced at the end of this flow. You cannot study the request until the page makes it.
Step 3: get to the chat window
Select the right answer and then answer no, which opens the customer support chat window. Answering no means "this did not solve my problem", which is what triggers the option to contact a person. Again, this step exists only to reach the form that sends the interesting request.
Step 4: prepare the content and the file
Type malicious content or post a malicious link, and attach any .exe, .dmg or .ps1 file. The form presents this as an image attachment. An .exe is a Windows program, a .dmg is a macOS disk image used to install software, and a .ps1 is a PowerShell script, a small program for Windows. None of these is an image, which is the whole point: the form claims to want a screenshot, and the researcher is offering a program instead.
Step 5: intercept and change the identity
Hit submit and intercept the request. Change the value of email and cell, which the researcher notes can be easily brute-forced for any existing user. Brute-forcing means trying many values in an automated way until one works; here it means guessing or enumerating other people's email addresses and phone numbers. The full request as captured:
POST /p/account/tickets/v3/tickets HTTP/1.1
Host: api.example.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://www.example.com/
Authorization: [redacted]
Content-Type: multipart/form-data; boundary=---------------------------163405244814986157001545857884
Content-Length: 6096
Origin: https://www.example.com/
DNT: 1
Connection: close
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="category"
XXXXXservice
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="cell"
9999999999
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="email"
[redacted]
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="quesHistory"
[{"key":"initialiserView","value":"{\"greetings\":\"XXXX from XXXXX\",\"hi\":\"Hi YYYY!\",\"question\":\"Are you facing problem with any of these services ?\",\"problem\":\"What are the problems you are facing\"}"},{"key":"questionView","value":"Are you facing problem with any of these services ?"},{"key":"userView","value":"XXXXXX"},{"key":"questionView","value":"Select the query we can help you with !"},{"key":"userView","value":"How can I download my xxxxxxx ?"},{"key":"answerView","value":"{\"answerTextBody\":\"1. Click on the 'xxxx' option on the xxxxx. \\n2."},{"key":"userView","value":"no it did not solve my query "}]
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="mild"
null
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="ticketstate"
1
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="query"
MALICIOUS POST AND URL AND OTHER DETAILS
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="resolve"
N
-----------------------------1634051111111111545857884
Content-Disposition: form-data; name="attachments"; filename="SHELL.EXE"
Content-Type: image/png
PNG
IHDR
/î@ IiCCPICC ProfileHWXSÉ[RIhH Ò«Z© J AÄβ¬k°¡«”®µ¢®uì®å¡,*+ëbÁÊX×ýÞ{ß;ß7÷þ9sÎJæÞ;N-O*ÍCuÈÈCYÓÒY¤n hS`ÌãË¥ìøøeøþwysZC¹æ¢äúçü= PÎ8S
MALICIOUS CONTENTXXXXXXXXXX
-----------------------------1634051111111111545857884--
Line by line, in plain words:
POST /p/account/tickets/v3/tickets HTTP/1.1is the first line of the request.POSTis the method, meaning "store this data". The path after it is the address of the ticket creation function on the API.HTTP/1.1is the version of the language being spoken.Host: api.example.comsays which server the request is for. Notice it is the API server, not the website you were browsing.User-Agenttells the server which browser and operating system produced the request. It is how the report knows Firefox 66.0 on macOS 10.14 was used.Acceptsays the browser would like the answer in JSON, a text format for structured data, or plain text.Accept-Languagesays the preferred language is US English.Accept-Encodingsays the browser can accept compressed answers to save bandwidth.Referersays which page the request came from, here the main website.Authorization: [redacted]is the session token. This is the line that proves who is logged in. It is the one piece of the request the server should be trusting for identity.Content-Type: multipart/form-data; boundary=...says the body is a form made of several parts, and gives the boundary, a separator string used to mark where one part ends and the next begins. Think of a form with several pages stapled together, and the boundary is the staple line.Content-Length: 6096is the size of the body in bytes.Originsays which site the request was initiated from.DNTis a request not to be tracked.Connection: closeasks the server to close the connection after answering.- After the blank line, the body begins. Each part starts with the boundary line, then a
Content-Dispositionline naming the field, then a blank line, then the value. categoryis set toXXXXXservice, the service category chosen in the flow.cellis the phone number field, here9999999999.emailis the email field, here[redacted].quesHistoryis a JSON array recording the questions and answers from the flow. Each entry has akey(which kind of view it is) and avalue(the text). It is the transcript of the conversation the user just had with the self-service system.mildisnull,ticketstateis1, andresolveisN. These carry the state of the ticket: whether it is resolved, and so on.queryholdsMALICIOUS POST AND URL AND OTHER DETAILS, the text the support agent will read.attachmentsis the file part.filename="SHELL.EXE"is the name the file will be stored under, and it ends in.EXE, an executable.Content-Type: image/pngis the label claiming the file is a PNG image. The two disagree, and the file was uploaded anyway.- The lines after that are the file's bytes, starting with
PNGand some binary noise, then the textMALICIOUS CONTENTXXXXXXXXXX. - The final boundary line ending in
--marks the end of the body.
The parts that matter:
Authorizationcarries the session token, but the ticket's owner is taken from theemailandcellfields in the body, so changing those two values creates the ticket for someone else. This is the broken access control: access control means the rules about who is allowed to do what, and here the rule about whose ticket this is was decided by data the user controls.attachmentsis sent withfilename="SHELL.EXE"while the part'sContent-Typeis declared asimage/png. The extension check on the image could be bypassed, so the executable file was uploaded. An extension is the part of a filename after the dot, which operating systems use to decide what kind of file it is.queryholds the malicious text or URL that the support executive will read.ticketstate,resolve,mildandquesHistorycarry the state of the question flow;quesHistoryis a JSON array of the questions and answers shown to the user.

The captured POST to customer support, showing the multipart body with the identity fields and the attachment part.
Step 6: upload a test file
The attachment section is meant for an image, but with no validation check any file can be uploaded. Validation means the server inspecting what it receives and rejecting anything that does not fit the rules. The researcher uploaded a non-malicious EICAR file to demonstrate this. EICAR is a standard test file that antivirus software is designed to flag, so it proves a file can carry something dangerous without actually being dangerous. The report gives its SHA-256 hash, a fingerprint of the file's contents, as [redacted].

The malicious file uploaded through the POST request, with the executable filename and the image content type.
Step 7: confirm the ticket on the victim
Submit the request and check the victim's account: the ticket has been created there. This is the proof. If the ticket had appeared in the researcher's own account, the identity fields would have been ignored and there would be no bug. Because it appeared in the other person's account, the server trusted the fields.
Step 8: make the file downloadable
To download the file, a valid session is needed. The researcher's point is that an attacker can host any website, upload content and give the link as example.com app/download to make a phishing page and get users to download the file, abusing the nature of this vulnerability. Phishing is tricking someone into trusting a link or page that looks legitimate. The trick here is that the download link points at the real company's servers, which makes it far more convincing than a link to an unknown site.

The file download obtained by changing the value of the chat id.
Root cause
The ticket creation endpoint accepted a ticket for another user after the email and cell fields in the multipart body were changed, so the access control on ticket creation is broken. The attachment handling, meanwhile, does not validate the file: a filename ending in .EXE was uploaded despite the image-only attachment field, so the restriction was bypassed.
The report notes that uploaded files are a significant risk when they are .exe or .ps1 files that can carry malware, but that the content-disposition was set as an attachment, so the file could not be executed directly on the server. Content-Disposition is a header that tells the browser whether to display a file in the page or save it to disk; attachment means save it, which stops the server from running it. Execution therefore depends on a user downloading and running the file.
Impact
Any malicious entity can create a ticket on behalf of another user and enter any details, which can cause failure in solving customer issues. Once a ticket is open, the user cannot create a new one for 10 hours because of the restriction on multiple ticket creation. This is a denial of service in a mild form: not by breaking the system, but by using up the one slot the real user has.
On the upload side, the attachment is downloadable, so it can be used to share malicious content from a valid website and in phishing emails that point to a download from valid example.com servers. The researcher's stated chain is that an attacker who finds a way to get the code executed can send the malicious file inside the ticket itself; since ticket creation is controlled by the attacker, it can paste the link as a customer care executive, and any user checking the false ticket may download and execute the file. The report hedges this: it is possible that malware may spread across the network and to the clients. The summary given in the report is that the upload is meant for screenshots for the customer support executive, but the failure to restrict file upload combined with ticket creation through broken access control makes malicious malware execution possible once downloaded, and that a user creating a ticket for another user causes loss of integrity and availability of customer support. Integrity means the data is what it claims to be; availability means the service is there when people need it.
Fix
For the broken access control, the report recommends role-based authentication and confirming both server and client while creating a ticket. Role-based authentication means deciding what someone may do from their assigned role, checked on the server, not from fields they send. For the upload, it recommends allowing only specific file extensions using both client-side and server-side validation, allowing only authorised and authenticated users to use the feature, and checking any file fetched from the web for content. The report does not say which of these, if any, the company implemented.
Variants to test
- Identity fields in the body. On any support, feedback or contact form, intercept the submission and change the email, phone or user id fields to another account's values. A positive result is a ticket appearing in the victim's account rather than the attacker's.
- Extension versus declared content type. Send an attachment with an executable filename (
.exe,.ps1,.dmg) and an imageContent-Type. A positive result is the server storing and later serving the file. - Download authorisation. Take the download URL for an attachment and change the chat or ticket id in it. A positive result is the file being served after the id is changed.
- Rate limits as a denial of service. Where a user can only open one ticket per period, create a ticket on their behalf and observe whether they are then blocked from opening their own. A positive result is the victim being unable to submit a genuine request.
- Content-disposition. Check how uploaded files are served. If they are served inline rather than as an attachment, the risk of execution in the browser context is higher than in this report, where the attachment disposition limited it.
Glossary
- API: the part of a service that programs and browsers talk to directly, exchanging data rather than web pages.
- Attachment: a file sent along with a message, such as a screenshot on a support ticket.
- Authentication: proving who you are, usually by logging in.
- Authorisation: the rules about what a proven identity is allowed to do.
- Broken access control: when a system lets someone do something they should not be allowed to do, because it does not check permissions properly.
- Brute-force: trying many values automatically until one works, for example guessing other users' email addresses.
- Bug bounty programme: a scheme where a company invites outside researchers to find and report security problems, sometimes for a reward.
- Content-Disposition: a header telling the browser whether to show a file in the page or save it to disk.
- Content-Type: a label saying what kind of data a part or file is, such as
image/png. - Denial of service: making a service unavailable to the people who need it.
- EICAR: a harmless standard test file that antivirus software is designed to detect.
- Extension: the part of a filename after the dot, such as
.exe, which operating systems use to decide the file type. - Header: a labelled line at the top of a request or response describing it.
- Integrity: the property that data is accurate and has not been tampered with.
- Intercepting proxy: a tool that sits between browser and server, letting you pause and edit requests.
- JSON: a text format for structured data, made of keys and values.
- Malware: software written to cause harm, such as a virus or ransomware.
- Multipart form data: a way of sending a form with several parts, including files, in one request.
- Phishing: tricking someone into trusting a fake page or link so they hand over information or run a file.
- POST request: an HTTP method used to send data to a server to be stored.
- Rate limit: a rule limiting how often an action can be performed, such as one ticket per 10 hours.
- Role-based authentication: deciding permissions from a user's assigned role, checked on the server.
- Session: the state of being logged in, maintained by a token sent with each request.
- SHA-256: a fingerprint of a file's contents, used to identify it.
- Token: a long string of characters proving a session, sent in the
Authorizationheader. - Unrestricted file upload: when a server accepts files of any type without checking them.
- Validation: checking incoming data against rules and rejecting what does not fit.