CVE-2024–24142 Exploitation & PoC
The 'subject' parameter in School Task Manager 1.0 is vulnerable to SQL injection, as shown by a syntax error when a quote is added. An attacker could use a time-based payload to delay responses and extract all databases.
Published on medium.com
i will today introduce a way to exploit & make a clear PoC about the new SQLi in school-task-manager.
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
Likely the application builds SQL queries by directly concatenating user input from the 'subject' parameter without parameterisation or escaping.
Impact
An attacker could extract all databases from the application, potentially exposing sensitive data.
What the attacker needed
Access to the application; ability to intercept HTTP requests
How it was found
- Find the application endpoint, such as the index page.
- Go to the subjects page and add or delete a subject while intercepting the request.
- Add a single quote after the numeric id in the request to trigger a SQL syntax error.
- Use a time-based SQL injection payload to cause a five-second delay.
- Extract all existing databases using the confirmed injection.
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.
SQL injection is when user input is inserted into a database query without proper handling, letting an attacker change the query's meaning. Here, adding a single quote to the subject value caused a database error, showing the input was not sanitised. The attacker then used a query that makes the database wait five seconds to confirm the injection works.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.