Skip to content
SQL injection Disclosed report Beginner

SQL Injection on █████

A parameter on an Airforce subdomain did not sanitise single quotes, allowing an attacker to inject SQL and extract database information such as the MySQL version, user, and database name. The report notes this is a regression of a previously fixed issue.

cdl Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 12 months
  • Disclosed after 4.6 years

Background:

It looks like the patch for #231338 has been reverted and this subdomain is yet again vulnerable to SQL injection.

Summary:

An Airforce subdomain is vulnerable to SQL Injection because the application does not produce sufficient validation on user input. This allows an attacker to execute SQL queries.

Description:

The ███= parameter on https://███████/█████████ does not properly sanitize ' characters, allowing an attacker to execute SQL queries!

Impact

This could potentially expose sensitive information because an attacker could potentially dump the databases on this server!

Step-by-step Reproduction Instructions

1.) Open Firefox or any browser
2.) Visit `https://███████/██████████=' and updatexml(null,concat(0x0a,version()),null)-- [email protected]`
3.) You will see the MySQL version in the response => `██████████`

User - ███████ payload => https://████████/████████████=' and updatexml(null,concat(0x0a,user()),null)-- [email protected]

Database - ████ payload => https://██████/█████████████=%27%20and%20updatexml(null,concat(0x0a,database()),null)--%[email protected]

██████

Suggested Mitigation/Remediation Actions

Sanitize input!

Thanks!

The original report as published on HackerOne, by cdl. 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 application concatenated user input into SQL queries without parameterisation or escaping, and a previous fix was reverted.

Impact

This could potentially expose sensitive information because an attacker could potentially dump the databases on this server.

What the attacker needed

None

The fix

The application should sanitise user input.

How it was found

  1. Open a browser such as Firefox.
  2. Visit the vulnerable URL with a crafted parameter value containing a single quote and a database function.
  3. Observe the MySQL version in the response.

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 a website puts user input directly into a database command without cleaning it. Here, typing a single quote broke the command and let the attacker add extra database instructions. The attacker could then read private data from 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 cdl

View all

14 more disclosed reports, best first.

More from U.S. Dept Of Defense

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.