The Import Certificate feature in Nginx-UI allows arbitrary write into the system, enabling an attacker to write into arbitrary paths. This can be leveraged into a remote code execution by overwriting the config file app.ini. The feature does not check if the provided user input is a certification/key, allowing for exploitation.
API Endpoints:
The `/api/cert` endpoint is vulnerable to arbitrary file write.
Vulnerable Parameters or Variables:
The `ssl certificate path`, `ssl certificate key path`, `ssl certificate`, and `ssl certificate key` variables are vulnerable to exploitation.
Function Names:
The `AddCert` function and the `WriteFile` function are involved in the vulnerability.