SQLi and RCE in Quicklert for Digium
The login page's username parameter was vulnerable to blind SQL injection, letting an unauthenticated attacker dump the whole database including plaintext user passwords. After logging in with those credentials, an authenticated user could upload a file to a media album that the server executed as a JSP, giving remote code execution as SYSTEM.
machevalia.blog
Published on machevalia.blog
Vulnerability DisclosureWrite Ups
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 username parameter was concatenated into a SQL query without sanitisation, and the media upload only checked file extensions and type loosely rather than validating content and storing files safely.
Impact
An unauthenticated attacker could read the entire database including plaintext administrator passwords, and an authenticated low-privilege user could execute code as SYSTEM, fully compromising the server and providing a foothold into the victim's network.
What the attacker needed
Network access to the login page; a low-privilege account for the upload step
The fix
The vendor fixed both issues in a later build by correcting the input sanitisation on the username parameter and adding stricter file-type validation to the album feature.
How it was found
- Send a crafted value in the uname parameter of the login page to trigger an out-of-band DNS request, confirming injection.
- Use the same technique to exfiltrate values such as the database name.
- Automate a time-based injection to dump tables, columns, user IDs and plaintext passwords.
- Log in with a recovered account and create a new media album.
- Upload a file through the album images form, renaming it so the server treats it as a JSP and adding a valid media header to pass type checks.
- Start a listener and open the uploaded file so the server executes it and connects back.
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 login form put whatever you typed into a database command without cleaning it, so an attacker could add their own database instructions and read every stored password. Those passwords were stored in plain text, so the attacker could log in as anyone, including an administrator. Once inside, a file upload feature accepted a file that looked like music but was really a program, and the server ran it, handing over the machine.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.