Skip to content
SQL injection Disclosed report Intermediate

MSSQL injection via param Customwho in https://█████/News/Transcripts/Search/Sort/ and WAF bypass

The Customwho parameter in a search URL was vulnerable to SQL injection, allowing an attacker to execute arbitrary SQL commands. The attacker could read and manipulate the database, and potentially achieve remote code execution.

bohdansec Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 5 days
  • Disclosed after 5 months

Summary:

MSSQL injection via param Customwho in https://███████/News/Transcripts/Search/Sort/

Description:

MSSQL injection via param Customwho in https://██████████/News/Transcripts/Search/Sort/

There is WAF, but we can make bypass and via global variable @@LANGID we can know that the base is used here - MSSQL

Impact

Critical

Step-by-step Reproduction Instructions

Via global variable @@LANGID we can find out that here is MSSQL database. ████

https://█████/News/Transcripts/Search/Sort/?Customwho=31002//|//@@LANGID

And if use a non-existing global variable, then we get an error. ██████

https://██████████/News/Transcripts/Search/Sort/?Customwho=31002//|//@@nonexisting

Suggested Mitigation/Remediation Actions

Using prepared statement

Impact

We can read and do other manipulations in the database. We can also try to make RCE

The original report as published on HackerOne, by bohdansec. 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 directly into an SQL query without using parameterised statements or proper input validation.

Impact

An attacker could read and manipulate the database, and may be able to achieve remote code execution.

What the attacker needed

None

How it was found

  1. Send a request to the search URL with the Customwho parameter set to a value that includes a global variable to confirm the database is MSSQL.
  2. Send a similar request using a non-existent global variable to trigger an error and further confirm the injection.

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 directly into a database query, letting an attacker change the query's meaning. Here, the Customwho parameter was not properly sanitised, so an attacker could add extra SQL commands to read or alter data. The report shows a way to confirm the database type and even bypass a web application firewall.

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 bohdansec

View all

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