```
# Vulnerability Description
There is an include on almost all the php files, which includes the language template.
For example:
In password_reset.php - Line 46 the following code tries to include the filename
that is specified in the $_SESSION['s']['language'] variable.
include ISPC_ROOT_PATH.'/web/login/lib/lang/'.$_SESSION['s']['language'].'.lng';
Searching a little bit where the $_SESSION['s']['language'] variable is set we can find a reference in user_settings.php
if(preg_match('/[a-z]{2}/',$_POST['language'])) {
$_SESSION['s']['user']['language'] = $_POST['language'];
$_SESSION['s']['language'] = $_POST['language'];
} else {
$app->error('Invalid language.');
}
The regex checks if the language contains two lower-case characters.
The problem is that everything that contains two [a-z] characters will match the regex.
Developer probably missed the ^ $ on the regex to match the entire file.
Since in the new versions of php we can not use null byte injections, either a path-truncation attack
we can create a ftp-account, upload the file we want to include with .lng extension at our path and the code
will get executed as the ispconfig account and not as our chroot-ed account.
This exploit can be triggered by having clients credentias , and exploiting this vulnerability we can compromise
the entire clients.
#
You need to specify the hostname:port , username, and password of the client.
```
暂无评论