To successfully reproduce this SQL injection vulnerability, the application must be running in debug mode (`APP_DEBUG=true` ).
Dcat Admin v2.2.2-beta and earlier versions contain a SQL injection vulnerability in the following endpoint:
The tb parameter is concatenated directly into a query against information_schema.columns without filtering or escaping. An authenticated attacker can use time-based blind SQL injection to read arbitrary database data, including data from other databases and tables, and administrator password hashes.
1. Log in to the system backend
2. Open the Scaffold generator and capture the request
3. Send the request to Burp Repeater
Locate the following request in Burp and send it to Repeater:
Do not modify the X-CSRF-TOKEN header or the Cookie .
4. Send a time-based blind SQL injection payload
Replace the request body with the following payload:
Send the request. The endpoint returns the following response after approximately 3.4 seconds :
{"status":1,"list":null}
Because the database version is 10.11.19 , its first character is 1 ; the condition is therefore true and SLEEP(3) executes.
5. Run a control test
Change ='1' to ='9' so that the condition is false, then send the request again. The endpoint returns the same HTTP 200 response but takes only approximately 0.35 seconds .
In src/Http/Controllers/ScaffoldController.php (approximately lines 227-237), the tb parameter is concatenated directly into the SQL query without filtering or parameter binding:
Use parameter binding for tb , for example AND TABLE_NAME = ? .
Validate the table name against a strict allowlist before using it in a query.
