GitHub Advisoryadvisory · Packagist

GHSA-hrgx-p36p-89q4 PrestaShop eval injection possible if shop vulnerable to SQL injection

CRITICAL Published 2022-07-29 Modified 2022-07-29 Official page ↗
Aliases
CVE-2022-31181
Ecosystem
Packagist
Packages
prestashop/prestashop
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-89, CWE-95
Reviewed
2022-07-29

Affected packages

• Packagist prestashop/prestashop: >= 1.6.0.10, < 1.7.8.7 → fixed in 1.7.8.7

Description

Impact Eval injection possible if the shop is vulnerable to an SQL injection. Patches The problem is fixed in version 1.7.8.7 Workarounds Delete the MySQL Smarty cache feature by removing these lines in the file `config/smarty.config.inc.php` lines 43-46 (PrestaShop 1.7) or 40-43 (PrestaShop 1.6): ```php if (Configuration::get('PS_SMARTY_CACHING_TYPE') == 'mysql') { include _PS_CLASS_DIR_.'Smarty/SmartyCacheResourceMysql.php'; $smarty->caching_type = 'mysql'; } ```

Related

Alias · CVE (1)

  • CVE-2022-31181 PrestaShop is an Open Source e-commerce platform. vulnerability

Weakness · CWE (2)

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command weakness
  • CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code weakness

References