Skip to content
XSS Write-up Intermediate

HackenProof Customer Story: Uklon

Uklon's web application contained multiple vulnerabilities: a self-XSS that could be escalated to reflected XSS, two IDORs allowing manipulation of driver images and comments, and a blind XSS in the admin panel. Attackers could steal credentials, delete or edit other users' data, and potentially take over the admin panel.

HackenProof Follow

Published on blog.hackenproof.com

As you may already know, last month HackenProof has hosted an onsite bug bounty marathon called Hacken Cup. We’ve invited 25 of our community members – a carefully selected group of some of the most talented hackers in the world to come to Ukraine and test 3 products: a local ridesharing service – Uklon…

HackenProof (@hackenproof), on blog.hackenproof.com

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

Context

Uklon is a Ukrainian ridesharing service that launched eight years before this event as a student project by Vitaliy Diatlenko, then 22. At the time of writing it is described as the largest ridesharing app in Ukraine, with millions of downloads and hundreds of thousands of active users. The service is made up of three main elements: a web application, an Android app and an iOS app.

The testing described here took place during Hacken Cup, an onsite bug bounty marathon hosted by HackenProof, to which 25 community members were invited to test three products in Ukraine: Uklon, the blockchain-based communication network Crypviser, and an international social platform that chose to remain anonymous. This article covers the Uklon findings. Hackers submitted 74 reports in total during the day.

The four issues below touch different parts of the product: the address error notification in the web application, the driver image handling in the partner interface, the trip feedback feature, and the administrator interface used to review passenger names and payment comments.

Setup

The report does not describe the accounts, roles or tooling used beyond what appears in the requests themselves. What can be read from the material:

  • Testing was performed against a staging host, partner-staging.uklon.com.ua, for the driver image issue.
  • Requests carry an appuid header, a clientid header and a session cookie, which indicates an authenticated session in the partner application.
  • The feedback endpoints are under /api/v1/ and are referenced without a host, so the exact host used for them is not stated.
  • The screenshot shows the information visible in the administrator interface, including other people's orders, phone numbers and IP addresses.

Finding it

Each of the four findings started from a different observation.

  1. Address error notification. The error message shown as an on-screen notification when a wrong address is entered contained user input almost as is, without filtering special characters. Because the input is reflected into the page, a Self XSS could be raised to a Reflected XSS.
  2. Driver images. The application exposes direct object references for driver images, so a user of the app or website could manipulate images or files belonging to any driver in the Uklon database.
  3. Trip comments. Comment identifiers are not unique values but a simple incrementing number, and the endpoints accept an identifier supplied by the client. Replacing the ID with the ID of someone else's comment allowed editing and deleting it.
  4. Administrator interface. Special characters were filtered in the user and driver interface, but the same filtering did not happen in the administrator interface. Two parameters were affected: the name of the passenger and the comments to the payment.

Exploitation

Step 1: Reflected XSS through the address error notification

Entering a wrong address produces an on-screen notification whose text includes the submitted input with special characters left in place. The report shows the resulting notification in a screenshot but does not include the payload used.

The escalation from Self XSS to Reflected XSS matters because the payload can be delivered to another user rather than only executed by the person who typed it. According to the report, the vulnerability allowed an attacker to:

  1. Compromise user login and password (keylogger)
  2. Steal user session
  3. Replace the homepage of Uklon to a different web-page and, in addition, post false notifications, images or advertising on Uklon's website

Step 2: Deleting and editing driver images (IDOR)

The driver image endpoint takes the image type and the driver's unique identifier from the request body. The following request removes an image:

HTTP
DELETE /driver/service/removeimage HTTP/1.1
Host: partner-staging.uklon.com.ua
Connection: close
Content-Length: 63
appuid: a306fc19-d7f2-4bbf-95ef-1a68c886d5b5
Origin: https://partner-staging.uklon.com.ua
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
clientid: [redacted]
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: your cookie
imagetype=driveravatar&uid=7890b85e-aa8c-4ae9-8e13-fbb1c30a1fc3

The body has two parameters: imagetype=driveravatar selects the driver avatar, and uid=7890b85e-aa8c-4ae9-8e13-fbb1c30a1fc3 identifies the driver whose image is targeted. The request carries appuid and clientid headers and a session cookie.

With this request it is possible to replace the driver's avatar. By replacing the uid with the identifier of another driver, an attacker could successfully delete the avatar of that user. The same class of access, per the report, allowed editing, deleting and uploading images or files of any driver within the Uklon database.

Step 3: Editing someone else's comments (IDOR)

Comment identifiers are sequential, so an attacker can walk the space by incrementing the ID. Sending the request with an ID increase of +1 deletes the next review, and repeating it with ID = 1, ID = 2, ID = 3 and so on deletes all reviews of all drivers.

Two further queries were found:

Text
PUT / api / v1 / feedbacks

This one allows editing and creating comments from other users.

Text
GET / api / v1 / drivers / [redacted] / feedbacks

This one returns feedback on other drivers, provided the attacker knows the driver's ID.

The practical consequence described is that a driver using Uklon who knows how to exploit the IDOR could replace all positive feedback about competitor drivers with negative feedback and vice versa, and replace all negative comments about himself with positive ones.

Step 4: Admin panel takeover through Blind XSS

Blind XSS occurs when an attacker's input is saved by the server and displayed in another part of the application or in another application entirely. A typical example is a payload injected into a contact or feedback page that loads when an administrator reviews the feedback entries. The input can execute in a completely different application, such as an internal one where the administrator reviews access logs or application exceptions.

In Uklon's case the payload was placed in two parameters: the name of the passenger and the comments to the payment. In the user and driver interface special characters were filtered and the vulnerability did not work there, but the administrator interface did not filter them, so arbitrary JavaScript could be executed. The screenshot shows that an attacker could track other people's orders, phone numbers, IP addresses and other useful information.

According to the report, this vulnerability allowed an attacker to:

  1. Steal admin login and password
  2. Replace and edit system data
  3. Perform further attacks on the user and the site

The report adds that the vulnerability could potentially have led to even greater losses for Uklon, but that this would have been a direct breach. In the real world it could have led to significant losses.

Root cause

The four findings share a common theme: input and object references are trusted on the server side without checking who is allowed to act on them.

  • Reflected XSS. The address error notification renders user input almost as is, without filtering special characters.
  • Driver image IDOR. The uid in the request body is taken as the target of the operation, and the server does not verify that the caller owns that driver record. The uid in the request body is taken as the target of the operation, and the report does not describe any ownership check.
  • Comment IDOR. Comment IDs are a simple incrementing number rather than an unguessable identifier, and the endpoints accept a client-supplied ID without an ownership check. Sequential IDs make enumeration trivial.
  • Blind XSS. Filtering was applied in the user and driver interface but not in the administrator interface, so the same stored value was rendered unsafely in the place where it mattered most.

Impact

The report frames each finding with its own consequences:

Finding Who is affected What an attacker could do
Reflected XSS Users of the web application Keylog login and password, steal the session, replace the Uklon homepage with another page, post false notifications, images or advertising on the site
Driver image IDOR Any driver in the database Edit, delete or upload images and files of any driver
Comment IDOR Drivers and their reviewers Edit, create and delete other users' comments, read feedback on other drivers when the driver ID is known
Blind XSS Administrators and, through them, the platform Steal admin login and password, replace and edit system data, perform further attacks on users and the site; view other people's orders, phone numbers, IP addresses and other information

The report notes that the Blind XSS could potentially have led to even greater losses for Uklon, but that this would have been a direct breach.

Fix

Based on the findings, the changes needed are:

  • Encode user input wherever it is rendered, including error notifications, and apply the same filtering and encoding in the administrator interface as in the user and driver interfaces.
  • Enforce object-level authorisation on the driver image endpoints so that a caller can only act on their own driver record, regardless of the uid supplied.
  • Replace sequential comment IDs with unguessable identifiers and check ownership on every read, create, edit and delete operation on feedback.

Variants to test

  1. Error and notification messages. Submit special characters into any field that produces a user-facing error or notification and watch whether they come back unencoded. A positive result is a reflected payload executing in the page context.
  2. Object identifiers in request bodies. Take any endpoint that accepts an identifier such as uid in a form body and swap it for an identifier belonging to another account. A positive result is a successful edit or delete on the other account's object.
  3. Sequential identifiers. Look for numeric IDs in feedback, comments, orders or messages and increment them. A positive result is reading, editing or deleting another user's record with ID + 1.
  4. Stored input rendered in admin views. Place payloads in passenger names, payment comments and similar free-text fields that staff review in a back office. A positive result is execution in the administrator interface, which can be confirmed with an out-of-band callback.
  5. Filtering differences between interfaces. Submit the same payload through the user-facing and driver-facing interfaces and compare how it is stored and rendered in the administrator interface. A positive result is a payload that is neutralised in one view but executes in another.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 15 min read.

What happened, in plain words

Uklon is a ridesharing service in Ukraine, a bit like a taxi app you order through your phone. It started eight years before this event as a student side project by Vitaliy Diatlenko, who was 22 at the time. By the time of this event it is described as the largest ridesharing app in Ukraine, with millions of downloads and hundreds of thousands of active users. The service has three main parts: a website you use in a browser, an Android app and an iOS app.

The testing happened at Hacken Cup, an onsite bug bounty marathon run by HackenProof. A bug bounty is a programme where a company invites outside people to look for security problems in its products and report them, usually for a reward. "Onsite" means the hackers travelled to a place and worked there together. HackenProof invited 25 members of its community to come to Ukraine and test three products: Uklon, a blockchain-based communication network called Crypviser, and an international social platform that chose to stay anonymous. This article is about what they found in Uklon. Over the day, the hackers submitted 74 reports in total.

The four problems described below touch different parts of the product: the message shown when you type a wrong address on the website, the handling of driver photos in the partner interface, the feedback feature attached to trips, and the administrator interface where staff review passenger names and payment comments.

Before going further, a few words that come up constantly. A web application is a program that runs on a company's server and that you use through your browser; the browser sends requests and the server sends back pages or data. An API (Application Programming Interface) is the part of a web application that answers requests with raw data rather than full web pages, so the mobile apps and the website can all ask the same server for the same information. A cookie is a small piece of text your browser stores for a website and sends back with every request, so the server can recognise you between requests; it is how a site remembers that you are logged in. A token or identifier is a value that names something specific, like a ticket number that points to one record in a database. A header is an extra line of information attached to a request, separate from the address and the body, used for things like saying what kind of data is being sent or which application is calling. The body of a request is the part that carries the actual data, such as form fields.

Setup

The report does not describe the accounts, roles or tools used beyond what appears in the requests themselves. What can be read from the material:

  • Testing was performed against a staging host, partner-staging.uklon.com.ua, for the driver image issue. A staging environment is a copy of the real service used for testing before changes go live, so it behaves like the real thing but is not the production system customers use.
  • Requests carry an appuid header, a clientid header and a session cookie, which indicates an authenticated session in the partner application. "Authenticated" simply means the request proves who is calling, the way a stamped ticket proves you paid to enter.
  • The feedback endpoints are under /api/v1/ and are referenced without a host, so the exact host used for them is not stated. An endpoint is one specific address on a server that performs one specific action, like a counter in a building where you can ask for one particular service.
  • The screenshot shows the information visible in the administrator interface, including other people's orders, phone numbers and IP addresses.

Finding it

Each of the four findings started from a different observation.

  1. Address error notification. The error message shown as an on-screen notification when a wrong address is entered contained user input almost as is, without filtering special characters. Because the input is reflected into the page, a Self XSS could be raised to a Reflected XSS. XSS stands for Cross-Site Scripting: it is when a website takes something a user typed and puts it back into a page in a way that the browser treats as code instead of text, so the browser runs it. Self XSS is when only the person who typed the input sees it run, which is low risk because you would be attacking yourself. Reflected XSS is when the input comes back in a response to a request that can be sent to someone else, so the attacker can make another person's browser run the code. A simple comparison: if a form prints your name back to you and you write a name that looks like a command, a careless form will run the command instead of showing it as text.
  2. Driver images. The application exposes direct object references for driver images, so a user of the app or website could manipulate images or files belonging to any driver in the Uklon database. IDOR stands for Insecure Direct Object Reference: the server lets you name an object directly, for example by its identifier, and does not check that the object belongs to you. Think of a cloakroom that hands out any coat when you read out any ticket number, without checking that the ticket is yours.
  3. Trip comments. Comment identifiers are not unique values but a simple incrementing number, and the endpoints accept an identifier supplied by the client. Replacing the ID with the ID of someone else's comment allowed editing and deleting it. An incrementing number is just 1, 2, 3 and so on, so anyone can guess the next one.
  4. Administrator interface. Special characters were filtered in the user and driver interface, but the same filtering did not happen in the administrator interface. Two parameters were affected: the name of the passenger and the comments to the payment. A parameter is one named field in a request, like a box on a form with a label. Filtering means removing or neutralising characters that could be dangerous, such as angle brackets that start an HTML tag.

Exploitation

Step 1: Reflected XSS through the address error notification

Entering a wrong address produces an on-screen notification whose text includes the submitted input with special characters left in place. The report shows the resulting notification in a screenshot but does not include the payload used. A payload is the piece of input an attacker crafts to trigger the problem.

The escalation from Self XSS to Reflected XSS matters because the payload can be delivered to another user rather than only executed by the person who typed it. According to the report, the vulnerability allowed an attacker to:

  1. Compromise user login and password (keylogger)
  2. Steal user session
  3. Replace the homepage of Uklon to a different web-page and, in addition, post false notifications, images or advertising on Uklon's website

A keylogger is code that records what you type, so it can capture your username and password as you enter them. A session is the logged-in state the server keeps for you, represented by the cookie; stealing it means taking over your logged-in identity without needing your password.

Step 2: Deleting and editing driver images (IDOR)

The driver image endpoint takes the image type and the driver's unique identifier from the request body. The following request removes an image:

HTTP
DELETE /driver/service/removeimage HTTP/1.1
Host: partner-staging.uklon.com.ua
Connection: close
Content-Length: 63
appuid: a306fc19-d7f2-4bbf-95ef-1a68c886d5b5
Origin: https://partner-staging.uklon.com.ua
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
clientid: [redacted]
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: your cookie
imagetype=driveravatar&uid=7890b85e-aa8c-4ae9-8e13-fbb1c30a1fc3

Line by line, in plain words:

  • DELETE /driver/service/removeimage HTTP/1.1 is the request line. DELETE is the method, the verb that says what action is wanted; here it means "remove something". /driver/service/removeimage is the endpoint, the address of the action. HTTP/1.1 is the version of the protocol being spoken.
  • Host: partner-staging.uklon.com.ua says which server the request is addressed to.
  • Connection: close asks the server to close the network connection after answering.
  • Content-Length: 63 says how many bytes long the body is, so the server knows where the body ends.
  • appuid: a306fc19-d7f2-4bbf-95ef-1a68c886d5b5 is a header carrying an identifier for the calling application.
  • Origin: https://partner-staging.uklon.com.ua tells the server which site the request came from, a piece of information browsers attach automatically.
  • Content-Type: application/x-www-form-urlencoded; charset=UTF-8 says the body is formatted like a web form, with fields joined by &, and that the text is UTF-8.
  • X-Requested-With: XMLHttpRequest is a header that marks the request as coming from JavaScript in a page rather than from typing an address in the bar.
  • clientid: [redacted] is another header identifying the client application.
  • Accept-Encoding: gzip, deflate says which compression formats the caller can accept in the response.
  • Accept-Language: en-US,en;q=0.9 says which languages the caller prefers.
  • Cookie: your cookie is where the session cookie would go; the report shows a placeholder rather than a real value.
  • The last line, imagetype=driveravatar&uid=7890b85e-aa8c-4ae9-8e13-fbb1c30a1fc3, is the body. It has two parameters: imagetype=driveravatar selects the driver avatar, and uid=7890b85e-aa8c-4ae9-8e13-fbb1c30a1fc3 identifies the driver whose image is targeted. The appuid and clientid headers identify the calling application, and the cookie carries the session.

With this request it is possible to replace the driver's avatar. By replacing the uid with the identifier of another driver, an attacker could successfully delete the avatar of that user. The same class of access, per the report, allowed editing, deleting and uploading images or files of any driver within the Uklon database.

Step 3: Editing someone else's comments (IDOR)

Comment identifiers are sequential, so an attacker can walk the space by incrementing the ID. Sending the request with an ID increase of +1 deletes the next review, and repeating it with ID = 1, ID = 2, ID = 3 and so on deletes all reviews of all drivers. This is like a row of lockers numbered 1, 2, 3 where the key to any locker opens all of them.

Two further queries were found:

Text
PUT / api / v1 / feedbacks

This one allows editing and creating comments from other users. PUT is the method used to send an updated or new version of a record to the server.

Text
GET / api / v1 / drivers / [redacted] / feedbacks

This one returns feedback on other drivers, provided the attacker knows the driver's ID. GET is the method for reading something without changing it.

The practical consequence described is that a driver using Uklon who knows how to exploit the IDOR could replace all positive feedback about competitor drivers with negative feedback and vice versa, and replace all negative comments about himself with positive ones.

Step 4: Admin panel takeover through Blind XSS

Blind XSS occurs when an attacker's input is saved by the server and displayed in another part of the application or in another application entirely. A typical example is a payload injected into a contact or feedback page that loads when an administrator reviews the feedback entries. The input can execute in a completely different application, such as an internal one where the administrator reviews access logs or application exceptions. "Blind" here means the attacker does not see the result immediately, because the code runs later, in someone else's browser, in a place the attacker cannot watch directly.

In Uklon's case the payload was placed in two parameters: the name of the passenger and the comments to the payment. In the user and driver interface special characters were filtered and the vulnerability did not work there, but the administrator interface did not filter them, so arbitrary JavaScript could be executed. JavaScript is the programming language browsers run, so code written in it runs inside the page. The screenshot shows that an attacker could track other people's orders, phone numbers, IP addresses and other useful information.

According to the report, this vulnerability allowed an attacker to:

  1. Steal admin login and password
  2. Replace and edit system data
  3. Perform further attacks on the user and the site

The report adds that the vulnerability could potentially have led to even greater losses for Uklon, but that this would have been a direct breach. In the real world it could have led to significant losses.

Root cause

The four findings share a common theme: input and object references are trusted on the server side without checking who is allowed to act on them.

  • Reflected XSS. The address error notification renders user input almost as is, without filtering special characters. Output encoding means converting special characters into harmless text before putting them in a page, so the browser shows them rather than runs them. A content security policy is a rule the site sends to the browser saying which scripts are allowed to run, a second line of defence.
  • Driver image IDOR. The uid in the request body is taken as the target of the operation, and the server does not verify that the caller owns that driver record. The appuid and clientid headers identify the application, not the authorisation scope of the operation. Authorisation is the check that you are allowed to do a particular thing, as opposed to authentication, which is only the check of who you are.
  • Comment IDOR. Comment IDs are a simple incrementing number rather than an unguessable identifier, and the endpoints accept a client-supplied ID without an ownership check. Sequential IDs make enumeration trivial. Enumeration means trying values one after another, which is easy when they are 1, 2, 3.
  • Blind XSS. Filtering was applied in the user and driver interface but not in the administrator interface, so the same stored value was rendered unsafely in the place where it mattered most.

Impact

The report frames each finding with its own consequences:

Finding Who is affected What an attacker could do
Reflected XSS Users of the web application Keylog login and password, steal the session, replace the Uklon homepage with another page, post false notifications, images or advertising on the site
Driver image IDOR Any driver in the database Edit, delete or upload images and files of any driver
Comment IDOR Drivers and their reviewers Edit, create and delete other users' comments, read feedback on other drivers when the driver ID is known
Blind XSS Administrators and, through them, the platform Steal admin login and password, replace and edit system data, perform further attacks on users and the site; view other people's orders, phone numbers, IP addresses and other information

The report notes that the Blind XSS could potentially have led to even greater losses for Uklon, but that this would have been a direct breach.

Fix

The report does not describe the fixes Uklon applied. Based on the findings, the changes needed are:

  • Encode user input wherever it is rendered, including error notifications, and apply the same filtering and encoding in the administrator interface as in the user and driver interfaces.
  • Enforce object-level authorisation on the driver image endpoints so that a caller can only act on their own driver record, regardless of the uid supplied.
  • Replace sequential comment IDs with unguessable identifiers and check ownership on every read, create, edit and delete operation on feedback.

Variants to test

  1. Error and notification messages. Submit special characters into any field that produces a user-facing error or notification and watch whether they come back unencoded. A positive result is a reflected payload executing in the page context.
  2. Object identifiers in request bodies. Take any endpoint that accepts an identifier such as uid in a form body and swap it for an identifier belonging to another account. A positive result is a successful edit or delete on the other account's object.
  3. Sequential identifiers. Look for numeric IDs in feedback, comments, orders or messages and increment them. A positive result is reading, editing or deleting another user's record with ID + 1.
  4. Stored input rendered in admin views. Place payloads in passenger names, payment comments and similar free-text fields that staff review in a back office. A positive result is execution in the administrator interface, which can be confirmed with an out-of-band callback. An out-of-band callback is a signal sent to a server the attacker controls, so the attacker learns the code ran even without seeing the page.
  5. Filtering differences between interfaces. Submit the same payload through the user-facing and driver-facing interfaces and compare how it is stored and rendered in the administrator interface. A positive result is a payload that is neutralised in one view but executes in another.

Glossary

  • API: the part of a web application that answers requests with raw data rather than full web pages, so apps and websites can share the same server.
  • Authentication: proving who you are, for example by logging in.
  • Authorisation: the check that you are allowed to perform a particular action on a particular object.
  • Blind XSS: XSS where the attacker's input is stored and later runs in someone else's browser, often an administrator's, so the attacker does not see it directly.
  • Body: the part of a request that carries the actual data, such as form fields.
  • Bug bounty: a programme where a company invites outside people to find and report security problems, usually for a reward.
  • Content security policy: a rule a site sends to the browser saying which scripts may run, as a second line of defence against XSS.
  • Cookie: a small piece of text a browser stores for a site and sends back with each request, used to recognise you between requests.
  • Endpoint: one specific address on a server that performs one specific action.
  • Enumeration: trying values one after another, easy when they are sequential numbers.
  • Filtering: removing or neutralising characters that could be dangerous before storing or showing input.
  • GET: the request method for reading something without changing it.
  • Header: an extra line of information attached to a request, separate from the address and the body.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • IDOR: Insecure Direct Object Reference, where the server lets you name an object directly and does not check that it belongs to you.
  • Incrementing number: a sequence like 1, 2, 3, easy for anyone to guess.
  • JavaScript: the programming language browsers run, so code written in it runs inside the page.
  • Keylogger: code that records what you type, used to capture usernames and passwords.
  • Output encoding: converting special characters into harmless text before putting them in a page, so the browser shows them rather than runs them.
  • Out-of-band callback: a signal sent to a server the attacker controls, used to confirm code ran without seeing the page.
  • Parameter: one named field in a request, like a box on a form with a label.
  • Payload: the piece of input an attacker crafts to trigger a vulnerability.
  • PUT: the request method for sending an updated or new version of a record to the server.
  • Reflected XSS: XSS where the input comes back in a response to a request that can be sent to someone else, so another person's browser runs the code.
  • Self XSS: XSS where only the person who typed the input sees it run, which is low risk.
  • Session: the logged-in state the server keeps for you, represented by a cookie.
  • Staging: a copy of the real service used for testing before changes go live.
  • Token: a value that names something specific, like a ticket number pointing to one record.
  • XSS: Cross-Site Scripting, when a site puts user input back into a page in a way the browser treats as code and runs it.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.