Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-4v37-24gm-h554

Опубликовано: 01 мар. 2022
Источник: github
Github: Прошло ревью
CVSS3: 6.3

Описание

Cross-Site Request Forgery (CSRF) Protection Bypass Vulnerability in CodeIgniter4

Impact

This vulnerability might allow remote attackers to bypass the CodeIgniter4 CSRF protection mechanism.

Patches

Upgrade to v4.1.9 or later.

Workarounds

These are workarounds for this vulnerability, but you will still need to code as these after upgrading to v4.1.9. Otherwise, the CSRF protection may be bypassed.

When Auto-Routing is Enabled

  1. Check the request method in the controller method before processing.

E.g.:

if (strtolower($this->request->getMethod()) !== 'post') { return $this->response->setStatusCode(405)->setBody('Method Not Allowed'); }

When Auto-Routing is Disabled

Do one of the following:

  1. Do not use $routes->add(), and use HTTP verbs in routes.
  2. Check the request method in the controller method before processing.

E.g.:

if (strtolower($this->request->getMethod()) !== 'post') { return $this->response->setStatusCode(405)->setBody('Method Not Allowed'); }

References

For more information

If you have any questions or comments about this advisory:

Пакеты

Наименование

codeigniter4/framework

composer
Затронутые версииВерсия исправления

< 4.1.9

4.1.9

EPSS

Процентиль: 33%
0.00131
Низкий

6.3 Medium

CVSS3

Дефекты

CWE-352

Связанные уязвимости

CVSS3: 6.3
nvd
почти 4 года назад

CodeIgniter4 is the 4.x branch of CodeIgniter, a PHP full-stack web framework. A vulnerability in versions prior to 4.1.9 might allow remote attackers to bypass the CodeIgniter4 Cross-Site Request Forgery (CSRF) protection mechanism. Users should upgrade to version 4.1.9. There are workarounds for this vulnerability, but users will still need to code as these after upgrading to v4.1.9. Otherwise, the CSRF protection may be bypassed. If auto-routing is enabled, check the request method in the controller method before processing. If auto-routing is disabled, either avoid using `$routes->add()` and instead use HTTP verbs in routes; or check the request method in the controller method before processing.

CVSS3: 6.3
debian
почти 4 года назад

CodeIgniter4 is the 4.x branch of CodeIgniter, a PHP full-stack web fr ...

EPSS

Процентиль: 33%
0.00131
Низкий

6.3 Medium

CVSS3

Дефекты

CWE-352