Blind SQL injection due to request precedence issue in global input registration
Permission checks and database queries in the banner-zone and campaign-zone admin pages could read different values for the same request parameter, creating a blind SQL injection. A restricted manager could use this mismatch to extract arbitrary database values such as password hashes and active session identifiers, and reusing an unexpired admin session could give administrative access.
- Fixed in 22 hours
- Disclosed after 3 months
Summary by the program
Description
HackerOne community member sh4d0byss has reported blind SQL injection in the banner-zone and campaign-zone administration pages. Permission checks and database queries could use different values for the same request parameter. A restricted manager could exploit this mismatch to extract arbitrary database values, including password hashes and active session identifiers. Reusing an extracted, unexpired administrator session can grant administrative access and the ability to modify configuration or disrupt ad delivery.
Resolution
The fix combines the request-precedence correction described in the authorization bypass finding with changes to the common input helpers. Global input registration and query-side helpers now both read POST values before GET values, ensuring that permission checks and database queries use the same identifiers. Cookies are excluded from this input path, removing dependence on the PHP request_order configuration. Both changes are required to close the reported input-source mismatch.
Security advisory
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 global input registration and the query-side helpers resolved duplicate parameters in a different order, so the authorisation check and the SQL query operated on different values.
Impact
A restricted manager could extract arbitrary database values, including password hashes and active session identifiers, and reusing an unexpired administrator session could grant administrative access and the ability to modify configuration or disrupt ad delivery.
What the attacker needed
An account with restricted manager rights
The fix
The fix changes input helpers so global registration and query-side helpers read POST before GET and exclude cookies, aligning checks and queries.
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 application often takes input from more than one place in a request, such as the URL and the submitted form body. If the part that decides whether you are allowed to do something reads one value while the part that builds the database query reads another, a low-privileged user can slip in data the check never saw. Here that let a restricted manager pull secret values out of the database 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.