提出 #1055652: amirhamza05 Student-Management-System 1.0 Avatar Upload Allows PHP Execution (GetShell)情報

タイトルamirhamza05 Student-Management-System 1.0 Avatar Upload Allows PHP Execution (GetShell)
説明A remote code execution vulnerability exists in the user avatar upload functionality. The server extracts the file extension from the client-supplied filename using `end(explode('.', $_FILES["file"]["name"]))` and constructs the destination filename as `user_<user_id>.<ext>`. The resulting file is written with `move_uploaded_file()` into `./upload/user_photo/`, which is a web-accessible directory inside the application's web root and is served from the same origin as the application. The server performs no server-side validation of the file extension, MIME type, file header, or image decoding. The only extension check present is in the client-side JavaScript (`user_profile.js:37-42`), which restricts uploads to `gif/png/jpg/jpeg` but can be bypassed trivially. The upload directory contains an empty `.htaccess` file and no rules preventing script execution. By contrast, the student avatar upload branch in `student_action.php:59,128` does enforce a `jpeg/jpg/png` allowlist, indicating that the user avatar branch is an oversight rather than an intentional design choice. As a result, an authenticated user can upload a `.php` file containing arbitrary PHP code. The predictable filename `user_<user_id>.php` allows the attacker to access the uploaded file directly, and the server executes it in the context of the web server process.
ソース⚠️ https://github.com/amirhamza05/Student-Management-System/issues/75
ユーザー
 Autumoon (UID 102409)
送信2026年10月24日 11:43 (1 月 ago)
モデレーション2026年11月23日 19:31 (1 month later)
ステータス承諾済み
VulDBエントリ442503 [amirhamza05 Student-Management-System 迄 449397e35d42e3779f14f0bfc654ab307103f7e3 User Avatar Upload student_action.php move_uploaded_file 特権昇格]
ポイント20

Interested in the pricing of exploits?

See the underground prices here!