> For the complete documentation index, see [llms.txt](https://kos0ng.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kos0ng.gitbook.io/notes/research/2023/cve-2023-0048.md).

# CVE-2023-0048

## Vulnerability Explanation

This vulnerability occur because there is no **sanitation** on user controlled input during the update configuration process. The input later, written to another **.php** file and this could lead to **RCE**.

## Vulnerability Type

* Code Injection

## CVSS <a href="#user-content-attack-vector" id="user-content-attack-vector"></a>

* [CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H](https://nvd.nist.gov/vuln/detail/CVE-2023-0048) (High)

## Vendor <a href="#user-content-vendor-of-product" id="user-content-vendor-of-product"></a>

* [daloRADIUS](https://www.daloradius.com/)

## Affected Version <a href="#user-content-affected-version" id="user-content-affected-version"></a>

* daloRADIUS **<= 1.3**

## Proof of Concept <a href="#user-content-steps-to-reproduce" id="user-content-steps-to-reproduce"></a>

1. Go to **Config** then go to **Mail Settings**
2. Change the From **Email Address** value to **malicious** payload, e.g `';phpinfo();$a='x`
3.

```
<figure><img src="/files/6gK5vQ1PmJuZHQ1JRVec" alt=""><figcaption></figcaption></figure>
```

4. Go to **config-mail.php** or **library/daloradius.conf.php** to see executed code.&#x20;
5. Injected code in **library/daloradius.conf.php** can be seen in image below
6.

```
<figure><img src="/files/1TbksANYeDAq9qrrIRCz" alt=""><figcaption></figcaption></figure>
```

7. Executed code on **config-mail.php** can be seen in image below
8.

```
<figure><img src="/files/mXSJR1S4yK5j4NiCPeuB" alt=""><figcaption></figcaption></figure>
```

9. Executed code on **library/daloradius.conf.php** can be seen in image below
10.

```
<figure><img src="/files/wrk28nVcUZdtymHf0TuD" alt=""><figcaption></figcaption></figure>
```

## Exploit Code <a href="#user-content-exploit-code" id="user-content-exploit-code"></a>

```python
# TBU
```

## Tested On <a href="#user-content-tested-on" id="user-content-tested-on"></a>

* daloRADIUS version: **1.3**

## Disclosure Timeline <a href="#user-content-disclosure-timeline" id="user-content-disclosure-timeline"></a>

* **2023-01-04:** Vulnerability discovered.
* **2023-01-04:** Vulnerability fixed.
* **2023-01-04:** Vulnerability reported to the MITRE corporation.
* **2023-01-04:** CVE has been assigned.
* **2023-01-04:** Public disclosure of the vulnerability.

## Researcher <a href="#user-content-discoverer" id="user-content-discoverer"></a>

* Achmad Zaenuri Dahlan Putra ([kos0ng](https://github.com/kos0ng))

## Additional Information <a href="#user-content-reference" id="user-content-reference"></a>

* <https://huntr.com/bounties/57abd666-4b9c-4f59-825d-1ec832153e79/>
* <https://github.com/lirantal/daloradius/commit/3650eea7277a5c278063214a5b71dbd7d77fc5aa>
