提出 #992654: KusalkaSilva Learning-Management-System ffeb873f8803f1e9664384ff75000c7da45466d2 SQL Injection情報

タイトルKusalkaSilva Learning-Management-System ffeb873f8803f1e9664384ff75000c7da45466d2 SQL Injection
説明The affected component is `login.php` (repository root). The endpoint reads `$_POST['username']` and `$_POST['password']` and concatenates them directly into two authentication queries, one against the `student` table and one against the `teacher` table: ```php $username = $_POST['username']; $password = $_POST['password']; /* student */ $query = "SELECT * FROM student WHERE username='$username' AND password='$password'"; $result = mysql_query($query)or die(mysql_error()); ... /* teacher */ $query_teacher = mysql_query("SELECT * FROM teacher WHERE username='$username' AND password='$password'")or die(mysql_error()); ``` No authentication, escaping, or parameterization is applied. An unauthenticated attacker can inject `' OR 1=1 -- -` into `username` to make the WHERE clause always true; the first row of the `student` table is then loaded and `$_SESSION['id']` is set to that student's id, so the attacker is logged in as an arbitrary existing user without knowing any password. Because the raw database error is printed with `or die(mysql_error())`, the same endpoint also works as an error-based SQL injection primitive (e.g. `UPDATEXML`/`CONCAT` payloads leak arbitrary column values such as the stored plaintext passwords). Combined with the plaintext password storage of this application, a single unauthenticated request is enough to take over any student or teacher account.
ソース⚠️ https://github.com/KusalkaSilva/Learning-Management-System/issues/1
ユーザー
 yinian328 (UID 101459)
送信2026年09月20日 17:19 (16 日 ago)
モデレーション2026年10月06日 07:49 (16 days later)
ステータス承諾済み
VulDBエントリ413892 [Kusalkasilva Learning-Management-System 迄 ffeb873f8803f1e9664384ff75000c7da45466d2 Login Endpoint login.php mysql_error username/password SQLインジェクション]
ポイント20

Do you know our Splunk app?

Download it now for free!