The Coffee Order That Made the Database Sleep
A parameter in a coffee ordering app's wait-time API was vulnerable to time-based SQL injection, allowing an attacker to make the database delay its response. The researcher confirmed the injection by observing consistent delays and used sqlmap to enumerate database details.
medium.com
Published on medium.com
It’s been a while since my last article — probably a few months. Work and university responsibilities have been taking up most of my time lately, to the point where it’s been hard to just sit down and write, even though there were quite a few things I wanted to document and share.
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could cause the database to delay responses and potentially extract information from the database, though the text does not claim full data exfiltration.
What the attacker needed
Access to the mobile app; ability to intercept API traffic
How it was found
- Intercept the app's API traffic using a proxy.
- Identify the wait-time endpoint and its parameters.
- Inject a time-delay payload into a parameter and observe a consistent delay.
- Repeat the request and compare with a normal request to confirm the delay.
- Use sqlmap with the saved request to enumerate the database.
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 write-up has not been written yet. The Original tab links to the source.
The app sent a value to its database without cleaning it first. By sending a special value that tells the database to wait, the researcher could see the delay in the response, proving the database was running their input. This is called time-based SQL injection.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.