Submit #1055664: amirhamza05 Student-Management-System 1.0 Unauthenticated Installer Endpoint Without Installation-State Chinfo

Titleamirhamza05 Student-Management-System 1.0 Unauthenticated Installer Endpoint Without Installation-State Ch
DescriptionAn 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
Source⚠️ https://github.com/amirhamza05/Student-Management-System/issues/79
User
 ipv0cn (UID 97662)
Submission10/24/2026 12:20 (1 month ago)
Moderation11/23/2026 19:31 (1 month later)
StatusAccepted
VulDB entry442507 [amirhamza05 Student-Management-System up to 449397e35d42e3779f14f0bfc654ab307103f7e3 Installer Endpoint install.php db_name code injection]
Points20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!