Skip to content

Vulnerability response Cross-site scripting and SQL injection ​

Overview ​

Information disclosure date ​

2022/08/17

Target version ​

  • (PHP8)exceedone/exment v5.0.2 and lower, and exceedone/laravel-admin v3.0.0
  • (PHP7) exceedone/exment v4.4.2 and lower, and exceedone/laravel-admin v2.2.2

How it was discovered ​

Discovered by notification.

Occurrence condition ​

  1. A script is executed when a script is entered at a specific URL or screen.
  2. A script is executed when you enter SQL at a specific URL.

*In order to prevent exploitation of this vulnerability as much as possible, the specific occurrence conditions of this issue will not be disclosed.

Threats posed by vulnerabilities ​

  • Exploiting functionality that does not involve re-authentication in the victim's session. Also, it is abused for phishing etc. by falsifying the appearance of the page.
  • By executing arbitrary SQL, unexpected data may be acquired.

How to respond ​

Please take one of the following actions.

  • (Recommended) Update exceedone/exment to v5.0.3 or higher and exceedone/laravel-admin to v3.0.1 or higher.
  • (Recommended) If for some reason you are still using the PHP7 version, update exceedone/exment to v4.4.3 or higher and exceedone/laravel-admin to v2.2.3 or higher.
  • Considering the degree of impact, we have also updated Ext v4, which is the PHP7 version.

How to deal with it (if you can't update for some reason) ​

If you cannot update for some reason, please modify the following files.

php
///// vendor/exceedone/exment/src/Form/Tools/CopyMenuButton.php
///// Around line 36
//Before
//$label = sprintf(exmtrans('common.message.confirm_execute'), ($label ?? exmtrans('common.copy')));
//After
$label = esc_html($label);
$label = sprintf(exmtrans('common.message.confirm_execute'), ($label ?? exmtrans('common.copy')));
php
///// vendor/exceedone/exment/src/Form/Tools/OperationButton.php
///// Around line 44
//Before
//$text = esc_html(sprintf(exmtrans('common.message.confirm_execute'), ($label ?? exmtrans('change_page_menu.custom_operation'))));
//After
$label = esc_html($label);
$text = sprintf(exmtrans('common.message.confirm_execute'), ($label ?? exmtrans('change_page_menu.custom_operation')));
php
// vendor/exceedone/exment/src/Form/Tools/PluginMenuButton.php
///// Around line 44
//Before
//$text = esc_html(sprintf(exmtrans('common.message.confirm_execute'), ($label ?? exmtrans('common.plugin'))));
//After
$label = esc_html($label);
$text = sprintf(exmtrans('common.message.confirm_execute'), ($label ?? exmtrans('common.plugin')));
php
// vendor/exceedone/exment/src/Grid/Tools/BatchUpdate.php
// Around line 36. Add the following
    /**
     * Set title for this action.
     *
     * @param string $title
     *
     * @return $this
     */
    public function setTitle($title)
    {
        $this->title = esc_html($title);

        return $this;
    }


// Around line 58. Add the following
$label = $this->operation->getOption('button_label') ?? $this->operation->operation_name;
$label = esc_html($label); // Add
$text = exmtrans('common.message.confirm_execute', $label);
javascript
// public/vendor/exment/js/common.js
///// Around line 219.
//Add the following
options = $.extend({
    title: 'Swal',
    text: null,
    html: null,
    type: "warning",
    input: null,
    inputKey: null,
    confirm: 'OK',
    cancel: 'Cancel',
    method: 'POST',
    data: [],
    redirect: null,
    preConfirmValidate: null,
    postEvent: null,
    showCancelButton: true,
    confirmCallback: null,
    htmlTitle: false, // 追加
}, options);

///// Around line 245
//Add the following
// Escape title
if (!options.htmlTitle) {
    options.title = $('<span/>').text(options.title).html();
}
javascript
// public/vendor/exment/js/modal.js
///// Around line 177.
//Before
//$('#modal-showmodal .modal-title').html(res.title);
//After
$('#modal-showmodal .modal-title').text(res.title);

///// Around line 186.
//Before
//$('#modal-showmodal .modal-title').html(original_title);
//After
$('#modal-showmodal .modal-title').text(original_title);

File replacement ​

Since there are many corrections in the following files, please back up the corresponding files and replace the files.

  • vendor\exceedone\exment\src\Form\Field\SwitchField.php
  • vendor\exceedone\laravel-admin\src\Grid\Column.php
  • vendor\exceedone\laravel-admin\src\Grid\Model.php

←Back