CVE-2022-31181
PrestaShop eval injection possible if shop vulnerable to SQL injection
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'; } ```
How to fix CVE-2022-31181
To remediate CVE-2022-31181, upgrade the affected package to a fixed version below.
- —upgrade to 1.7.8.7 or later
Is CVE-2022-31181 being exploited?
Likely — EPSS is 78.3%, placing CVE-2022-31181 in the top tier of vulnerabilities by exploitation probability. Prioritise patching.
Affected packages (1)
- >= 1.6.0.10, < 1.7.8.7
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | CRITICAL9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |