SQL-Injektion in Hafenverwaltung YABOOK erlaubt Umgehung der Authentisierung
The login form of the YABOOK harbour management web application was vulnerable to SQL injection in the username field, allowing an unauthenticated attacker to bypass authentication and log in as administrator. The same flaw allowed full compromise of the application, including reading and manipulating all data and extracting unsalted MD5 password hashes.
Published on pentagrid.ch
YABOOK ist eine webbasierte Software von News-Solutions zur Verwaltung von Anliegerplätzen in Häfen. Einige Häfen nutzen diese Lösung als gehostete Applikation oder auch als On-Prem-Installation.
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 concatenated user input directly into the SQL login query instead of using parameterised queries, so crafted input altered the query logic.
Impact
An unauthenticated attacker with network access could bypass authentication, take over the administrator account and fully compromise the application, reading and manipulating all data; if the application is reachable from the internet, no internal network access is needed.
What the attacker needed
Network access to the web application; application reachable (internet or LAN)
The fix
The issue was fixed in version 6.61, and the vendor was advised to stop showing SQL syntax error messages and to inform affected customers.
How it was found
- Send a login request with an odd number of single quotes in the username field and observe a database error message.
- Craft a username value that closes the query and adds a condition that is always true, with any password.
- Submit the login and get logged in automatically as administrator.
- Use an automated SQL injection tool to confirm the injection point and identify the MySQL backend.
- Use the injection to retrieve user password hashes from the database.
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 page built a database query by pasting the typed username straight into it. By typing special characters, an attacker could change the meaning of that query so the database always said the login was correct, even without knowing any password. This let them get in as the administrator and read or change everything in the application.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.