Skip to content
SQL injection Disclosed report Intermediate CVE-2025-52664

Error-Based & Time-Based SQL Injection in 'keyword' Parameter of admin-search.php Allowing Full Database Access in Revive Adserver v6.0.0

The admin-search.php page in Revive Adserver passes the 'keyword' GET parameter into several database queries without sanitisation, allowing SQL injection. An authenticated attacker could extract, modify or delete database contents.

kanon4 Follow

Originally disclosed on HackerOne

High 8.8 View original
  • Triaged in 11 hours
  • Fixed in 18 hours
  • Disclosed after 39 hours

==Cricetinae==

#Summary:

A critical SQL Injection vulnerability has been identified in Revive Adserver's administrative search functionality, specifically in the admin-search.php file. The vulnerability exists in the handling of the keyword GET parameter, which is passed to multiple database queries without proper sanitization or parameterization.

The vulnerability stems from the use of the phpAds_registerGlobalUnslashed() function to register user input variables, including keyword, without proper escaping:

PHP
phpAds_registerGlobalUnslashed('keyword', 'client', 'campaign', 'banner', 'zone', 'affiliate', 'compact');

Subsequently, this user-controlled input is passed directly to several database query functions:

PHP
$rsClients = $dalClients->getClientByKeyword($keyword, $agencyId);
$rsCampaigns = $dalCampaigns->getCampaignAndClientByKeyword($keyword, $agencyId);
$rsBanners = $dalBanners->getBannerByKeyword($keyword, $agencyId);
$rsAffiliates = $dalAffiliates->getAffiliateByKeyword($keyword, $agencyId);
$rsZones = $dalZones->getZoneByKeyword($keyword, $agencyId);

Without examining the implementation of these functions, it's evident they do not properly sanitize the keyword parameter before incorporating it into SQL queries, resulting in SQL Injection.

Technical Analysis

Testing with SQLMap confirmed two distinct SQL Injection vulnerabilities:

1.Error-based injection using MySQL's EXTRACTVALUE function:

Bash
Payload: keyword=FUZZ') AND EXTRACTVALUE(8429,CONCAT(0x5c,0x716a7a6a71,(SELECT (ELT(8429=8429,1))),0x7178787871))-- Nqvq&compact=t
  1. Time-based blind injection using MySQL's SLEEP function:
Bash
Payload: keyword=FUZZ') AND (SELECT 3790 FROM (SELECT(SLEEP(5)))yGYJ)-- YFDA&compact=t

#Steps To Reproduce:

  1. open burp suite And open the built-in browser with it
  2. Go to the following request: http://localhost/www/admin/admin-search.php?keyword=FUZZ&compact=t
  3. Capture the request using Burp Suite
  4. Save the request to a text file using nano testsql.txt
  5. Run the following command:
Bash
sqlmap -r testsql.txt --dbs
  1. ==You will see the database being extracted==

#Supporting Material/References:

PoC Video

SQL_Injection.mp4 From the original on HackerOne

https://portswigger.net/web-security/sql-injection https://owasp.org/www-community/attacks/SQL_Injection https://www.imperva.com/learn/application-security/sql-injection-sqli/ https://www.cloudflare.com/learning/security/threats/sql-injection/ https://www.acunetix.com/websitesecurity/sql-injection/

Impact

This vulnerability allows an authenticated attacker to:

  • Extract sensitive information from the database
  • Modify or delete database contents
  • Potentially execute privileged commands on the database server
  • Possibly escalate to a more severe attack vector through data exfiltration

The SQLMap test successfully identified the database name and confirmed the ability to execute arbitrary SQL queries through the vulnerable parameter. Root Cause

The root cause is improper input validation and the absence of prepared statements or parameterized queries. The application directly incorporates user-controlled input into SQL queries without adequate sanitization or escaping mechanisms.

This is a fundamental code flaw in the Revive Adserver source code and not a result of misconfiguration.

The original report as published on HackerOne, by kanon4. 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

The application registers the 'keyword' parameter unslashed and passes it directly into multiple database query functions without parameterisation or escaping.

Impact

An authenticated attacker could extract sensitive information, modify or delete database contents, and potentially execute privileged commands on the database server.

What the attacker needed

Authenticated admin access; access to admin-search.php

How it was found

  1. Open Burp Suite and its built-in browser.
  2. Navigate to the admin-search.php URL with a keyword parameter and compact=t.
  3. Capture the request in Burp Suite.
  4. Save the captured request to a text file.
  5. Run sqlmap against the saved request with the --dbs option.
  6. Observe the database being extracted.

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 into a database command without being cleaned, so an attacker can change the command. Here the search box on an admin page takes the keyword and puts it straight into database queries, letting a logged-in admin run their own database commands.

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 kanon4

View all

4 more disclosed reports, best first.

More from Revive Adserver

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.