Skip to content

Vulnerability response Unauthorized changes to custom table settings ​

Overview ​

Information release date ​

2024/10/10

Target version ​

  • (PHP8.2) exceedone/exment v6.1.4 or lower, and exceedone/laravel-admin v4.1.1
  • (PHP8.0) exceedone/exment v5.0.11 or lower, and exceedone/laravel-admin v3.0.3

How it was discovered ​

It was discovered through a report.

Conditions ​

Send a request because unauthorized custom table settings and custom columns can be tampered with

※The specific conditions under which this issue occurs will not be disclosed in order to prevent abuse of this vulnerability as much as possible.

Threat posed by vulnerabilities ​

  • The vulnerability exploits the functionality of not re-authenticating the victim's session, and can also be used for phishing by creating a visually defaced page.

Solution ​

Please take one of the following actions:

  • (Recommended) If you can upload the entire project (including Exments): Solution 1
  • If for some reason you can't upload the entire project (e.g. you want to keep the Exment version), try the solution 2.

※ Considering the impact of this issue, we are also updating Exment v5, the PHP 8 version.

Solution 1: If you can upload the entire project (including Exment) ​

Please update Exment and laravel-admin by clicking here.
※exceedone/exment will be updated to v6.1.5 or higher, and exceedone/laravel-admin will be updated to v4.1.2 or higher.
※If for some reason you are still using PHP8, exceedone/exment will be updated to v5.0.12 or higher, and exceedone/laravel-admin will be updated to 3.0.3 or higher.

Solution 2: If you are unable to update for some reason ​

If you are unable to update for any reason, please modify the following file.

php
// vendor/exceedone/exment/resources/lang/en/exment.php
///// Around line 116
//Add the following
'not_edit_column_type' => 'The column type cannot be changed.',
php
// vendor/exceedone/exment/resources/lang/ja/exment.php
///// Around line 116
//Add the following
'not_edit_column_type' => 'Column type cannot be changed.',
php
// vendor/exceedone/exment/src/Controllers/AdminControllerTableBase.php
///// Around line 62
//Add the following
protected function validateEditColumnType($column, $columnType)
{
    if (is_null($columnType) || $columnType !== $column->column_type) {
        Checker::error(exmtrans("common.message.not_edit_column_type"));
        return false;
    }
    return true;
}
php
// vendor/exceedone/exment/src/Controllers/CustomColumnController.php
///// Around line 82
//Add the following
/**
* Update the specified resource in storage.
*
* @param int $id
*
* @return \Illuminate\Http\Response
*/
public function update($tableKey, $id)
{   
    //Validation table value
    if (!$this->validateTable($this->custom_table, Permission::CUSTOM_TABLE)) {
        return;
    }
    if (!$this->validateTableAndId(CustomColumn::class, $id, 'column')) {
        return;
    }
    if (request()->has('column_type')) {
        $column_type = request()->get('column_type');
        $column = $this->custom_columns->first(function ($value) use ($id) {
            return $ value->id == $id;
        });
{
            return;
        }
    }

    return $this->form($id)->update($id);
}
php
// vendor/exceedone/exment/src/Controllers/CustomTableController.php
///// Around line 667
//Add the following
if (!$this->validateTable($id, Permission::CUSTOM_TABLE)) {
    return;
}

← Back to list