提交 #1055664: amirhamza05 Student-Management-System 1.0 Unauthenticated Installer Endpoint Without Installation-State Ch信息

标题amirhamza05 Student-Management-System 1.0 Unauthenticated Installer Endpoint Without Installation-State Ch
描述An unauthenticated PHP code injection vulnerability exists in the application installer. The installer entry point `install_action.php` is publicly reachable and does not verify whether the application has already been installed. It accepts the database host, username, password, and database name from POST parameters and interpolates them directly into a PHP configuration file using single-quoted strings, without any escaping, serialization, or `var_export()` usage. After a successful database connection, the generated configuration content is unconditionally appended to `config/db.php` using `file_put_contents(..., FILE_APPEND | LOCK_EX)`. Because the values are placed inside single-quoted PHP strings, an attacker who controls a MySQL instance can supply a crafted database name that closes the PHP string and injects arbitrary PHP code. The configuration file is included site-wide, so the injected code executes on subsequent requests. The vulnerable flow includes: - `install_action.php:3` — public entry point, no login, no token, no installation-state check - `page_action/install/install.php:25` — processing begins whenever `install_first_step` is present - `page_action/install/install.php:33-40` — four database values are interpolated directly into PHP single-quoted strings - `page_action/install/install.php:42` — execution continues only after a successful database connection - `page_action/install/install.php:44` — unconditional append write to `config/db.php` - `page_action/install/install.php:45` — re-runs `sql/install_sql.sql` after success - `script/install/install.php:12-24` — `step_install()` only decides which page to show and does not constitute access control
来源⚠️ https://github.com/amirhamza05/Student-Management-System/issues/79
用户
 ipv0cn (UID 97662)
提交2026-10-24 12時20分 (1 月前)
管理2026-11-23 19時31分 (1 month later)
状态已接受
VulDB条目442507 [amirhamza05 Student-Management-System 直到 449397e35d42e3779f14f0bfc654ab307103f7e3 Installer Endpoint install.php db_name 权限提升]
积分20

Do you need the next level of professionalism?

Upgrade your account now!