Skip to content
SQL injection Disclosed report Beginner

SQLi | in URL paths

A parameter in a URL path was concatenated into a SQL query without sanitisation, so a single quote produced a database error. An attacker could use that injection point to dump the database and read user information.

almuntadhar0x01 Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 9 days
  • Fixed in 9 days
  • Disclosed after 39 days

Summary by the researcher

How is this in scope?

--> https://www.mtn.co.za/insurance/device-cover/

Bash
site:admyntec.co.za intitle:"MTN"

The report

Summary:

A SQL Injection vulnerability was discovered in the customerId parameter of the URL path: ███████ We can observe this by adding a little quote in the customerId: █████████ which will show the following error, indicating that its vulnerable to SQL Commands Injection: ███████

Steps To Reproduce:

We can use any SQL Commend here, by just closing the Statement ( putting ') and then use a command and also we make sure to make the rest as a comment, here is a basic SQL command i used: ███████ or we can use tools like SQLmap to get access to the database, here is the command i used:

sqlmap -u "██████

██████

Impact

Summary:

An attacker can exploit this to dump and download the database, Which will give them access to user informations.

The original report as published on HackerOne, by almuntadhar0x01. 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 customerId value taken from the URL path was concatenated directly into a SQL statement without parameterisation or validation.

Impact

An attacker could dump and download the database, gaining access to user information.

What the attacker needed

Reachable URL with customerId in path

How it was found

  1. Open the affected URL path that contains the customerId value.
  2. Add a single quote to the customerId value and load the page.
  3. Observe the database error that appears, confirming the injection.
  4. Close the statement and append a SQL command, commenting out the remainder.
  5. Optionally run an automated SQL injection tool against the URL to extract data.

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 often builds database questions (queries) by gluing text together. If a value from the address bar is dropped straight into that text, a user can add their own database instructions. Here a stray quote character broke the query and revealed an error, showing the input was not being handled safely.

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 from MTN Group

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.