Skip to content
SQL injection Write-up Intermediate

Authenticated Time-Based Blind SQL Injection in Rukovoditel 3.7.1

Several authenticated action handlers in Rukovoditel 3.7.1 build SQL queries by pasting the selected_fields POST value straight into the statement, so a logged-in user can inject SQL. The author confirmed this with time-based blind injection and also saw verbose database errors leaking query text, paths and stack traces.

medium.com

Published on medium.com

Multiple authenticated SQL Injection vulnerabilities were identified in Rukovoditel version 3.7.1, an open-source PHP/MySQL project management platform.

DARN, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The code concatenates the selected_fields POST value into the SQL string instead of validating it as a list of integers or binding it as a parameter.

Impact

An authenticated user could run arbitrary SQL, extract database contents and read internal details from verbose errors; the author verified this only in a local isolated environment.

What the attacker needed

An authenticated account; access to the entities fields actions; a valid request token

The fix

The parameter should be validated as a list of integers and prepared statements used where possible; the text does not say a fix was released.

How it was found

  1. Log in and reach the entities fields action with a valid token.
  2. Send a POST request to the mulitple_edit action with a normal selected_fields value and note the response time.
  3. Replace selected_fields with a time-delay expression and observe the much longer response.
  4. Send a malformed value to trigger a verbose SQL error and read the leaked query and paths.

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 write-up has not been written yet. The Original tab links to the source.

The application takes a list of field numbers from a form and drops it straight into a database command. Because the database treats that text as part of the command, a user can add extra instructions that make the database wait or reveal data. The author proved this by sending a request that made the server pause for several seconds.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

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.