SQL injection via includebanner array keys in zone-include.php
The zone banner-linking page did not cast the keys of the submitted banner-selection array to integers, so a crafted array key was concatenated unquoted into the banner-lookup query. A manager or a user with permission to link banners to zones, who owned the selected website and zone, could place SQL in an array key and run time-based blind SQL injection as the application's database account.
- Fixed in 13 hours
- Disclosed after 3 days
Summary by the program
Description
HackerOne community member Kaushalendra Dubey (titanrain) reported that the zone banner-linking page did not cast the keys of the submitted banner-selection array to integers. A manager, or a website user with permission to link banners to zones, who owned the selected website and zone could place SQL in an array key, which was concatenated unquoted into the banner-lookup query. This allowed time-based blind SQL injection as the application's database account. The single-banner link path on the same page was already integer-constrained and was not affected.
Resolution
Zone banner linking now accepts only positive integer keys in the banner-selection array; any other key is discarded before the value reaches the data-access layer, so a crafted key can no longer alter the lookup query.
Security advisory: https://www.revive-adserver.com/security/revive-sa-2026-005
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 banner-selection array keys were concatenated unquoted into the SQL lookup query without integer casting, unlike the single-banner path which was already integer-constrained.
Impact
An attacker with banner-linking permission on a website and zone they own could extract data from the database through time-based blind SQL injection, limited to the privileges of the application's database account.
What the attacker needed
Manager or banner-linking permission; owns the selected website and zone
The fix
Zone banner linking was fixed to accept only positive integer keys in the banner-selection array, discarding any other key before it reaches the data-access layer.
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.
When a web page sends a list of items to the server, each item has a name (a key) and a value. Here the server trusted the names and pasted them straight into a database question (a query) without checking they were numbers. By putting database instructions into a name, an attacker could make the database answer slowly or quickly, which leaks information one bit at a time.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.