Skip to content
SQL injection Write-up Beginner

Sql Injection Attack On Email Id Field

The email subscription field was vulnerable to SQL injection, as a single quote caused a database error revealing an Oracle error. An attacker could use SQLMap to identify the database type and enumerate database names.

Sumeet Mahadik Follow

Published on infosecwriteups.com

Hi, I’m Sumeet Sunil Mahadik, a security engineer. I’m passionate about Hacking and Cyber Security.

Sumeet Mahadik, on infosecwriteups.com

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

Root cause

Likely the application concatenated user input directly into an SQL query without parameterisation or input validation.

Impact

An attacker could confirm SQL injection and enumerate database names, potentially leading to further data exposure.

What the attacker needed

Access to the subscription endpoint; Ability to intercept and modify requests

How it was found

  1. Capture the subscription request in Burp Suite and send it to Repeater.
  2. Replace the email address in the txtNewsUpdates parameter with a single quote.
  3. Send the request and observe a 500 error with an Oracle database error.
  4. Run sqlmap against the URL with the --dbs option to enumerate databases.

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.

SQL injection is when user input is inserted into a database query without proper handling, letting an attacker change the query's meaning. Here, typing a single quote into an email field broke the query and showed a database error, proving the input was not sanitised. The attacker then used an automated tool to list database names.

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 Sumeet Mahadik

View all

1 more disclosed report, best first.

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.