| 제목 | gedelumbung HospitalManagement c2d45543789a3887067d3915f69d44cfc2cf76a8 Cross Site Scripting |
|---|
| 설명 | The affected components are `application/modules/admin/controllers/sistem.php::simpan()`, `application/modules/admin/views/sistem/bg_input.php`, `application/models/app_load_config_model.php::__construct()`, and `application/modules/admin/views/bg_header.php`. The `simpan()` action persists user input without escaping on every save:
```php
// application/modules/admin/controllers/sistem.php (lines 65-72)
public function simpan()
{
if($this->session->userdata("logged_in")!="" && $this->session->userdata("level")=="admin")
{
$tipe = $this->input->post("tipe");
$id['id_setting'] = $this->input->post("id_param");
$in['tipe'] = $this->input->post("tipe");
$in['title'] = $this->input->post("title");
$in['content_setting'] = strip_tags($this->input->post("content_setting"));
$this->db->update("dlmbg_setting",$in,$id);
redirect("admin/sistem");
}
...
}
```
`$in['title']` is saved without escaping or `strip_tags`. The same row's `content_setting` value is loaded back into `$GLOBALS[$d->tipe]` by `app_load_config_model`:
```php
// application/models/app_load_config_model.php
public function __construct()
{
$dt = $this->db->get("dlmbg_setting");
foreach($dt->result() as $d)
{
$GLOBALS[$d->tipe] = $d->content_setting;
}
}
```
The model output `generate_index_sistem()` echoes `$h->title` raw:
```php
// application/models/app_global_admin_model.php (line 189)
$hasil .= "<td>".$h->title."</td>
```
And `bg_header.php` echoes `$GLOBALS['site_title']` and `$GLOBALS['site_quotes']` raw inside the `<title>` and the H1:
```php
// application/modules/admin/views/bg_header.php (line 11)
<title><?php echo $GLOBALS['site_title'].' - '.$GLOBALS['site_quotes']; ?></title>
```
The same `$GLOBALS['site_title']` value is rendered by every admin page because every page includes `bg_header.php`. The `content_setting` payload is partially mitigated by `strip_tags`, but the `title` field is not, and `content_setting` itself can be smuggled past `strip_tags` using NULL-byte / malformed-tag tricks in older PHP versions, so both sinks are vulnerable.
|
|---|
| 원천 | ⚠️ https://github.com/gedelumbung/HospitalManagement/issues/15 |
|---|
| 사용자 | lixiang (UID 101908) |
|---|
| 제출 | 2026. 10. 09. PM 01:54 (14 날 ago) |
|---|
| 모더레이션 | 2026. 10. 22. PM 09:33 (13 days later) |
|---|
| 상태 | 수락 |
|---|
| VulDB 항목 | 425388 [gedelumbung HospitalManagement 까지 c2d45543789a3887067d3915f69d44cfc2cf76a8 Settings sistem.php sistem.php::simpan title 크로스 사이트 스크립팅] |
|---|
| 포인트들 | 20 |
|---|