Submeter #992655: KusalkaSilva Learning-Management-System ffeb873f8803f1e9664384ff75000c7da45466d2 SQL Injectioninformação

TítuloKusalkaSilva Learning-Management-System ffeb873f8803f1e9664384ff75000c7da45466d2 SQL Injection
DescriçãoThe affected component is `admin/login.php`. The administrator login endpoint interpolates `$_POST['username']` and `$_POST['password']` directly into the query that validates the `users` table: ```php $username = $_POST['username']; $password = $_POST['password']; $query = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password'")or die(mysql_error()); $count = mysql_num_rows($query); $row = mysql_fetch_array($query); if ($count > 0){ $_SESSION['id']=$row['user_id']; echo 'true'; mysql_query("insert into user_log (username,login_date,user_id)values('$username',NOW(),".$row['user_id'].")")or die(mysql_error()); }else{ echo 'false'; } ``` An unauthenticated attacker can send `' OR 1=1 LIMIT 1 -- -` as the username to match an arbitrary row of the `users` table, receive `true`, and obtain an authenticated administrator session (`$_SESSION['id']` = that user's id) without any password. The same injection point is also a general SQL injection primitive against the `capstone` database, and the shipped database dump `db/NSBM.sql` contains the default administrator account `('admin','admin')`, so an attacker who reaches the panel can log in with well-known credentials as well.
Fonte⚠️ https://github.com/KusalkaSilva/Learning-Management-System/issues/2
Utilizador
 yinian328 (UID 101459)
Submissão20/09/2026 17h20 (há 16 dias)
Moderação06/10/2026 07h49 (16 days later)
EstadoAceite
Entrada VulDB413893 [Kusalkasilva Learning-Management-System até ffeb873f8803f1e9664384ff75000c7da45466d2 Administrator Login Endpoint admin/login.php mysql_query username/password Injeção SQL]
Pontos20

Want to stay up to date on a daily basis?

Enable the mail alert feature now!