9.8critical
Remote code execution in prestashop
- Severity
- 9.8critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 7.65% (higher than 94% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-hrgx-p36p-89q4
Description
PrestaShop is an Open Source e-commerce platform. In versions from 1.6.0.10 and before 1.7.8.7 PrestaShop is subject to an SQL injection vulnerability which can be chained to call PHP's Eval function on attacker input. The problem is fixed in version 1.7.8.7. Users are advised to upgrade. Users unable to upgrade may delete the MySQL Smarty cache feature.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| PrestaShop PrestaShop | >= 1.6.0.10, < 1.7.8.7, from 1.6.0.10 before 1.7.8.7 | CVE List, NVD |
| prestashop/prestashop (Packagist) | from 1.6.0.10 before 1.7.8.7 | GitHub Advisory Database |
All scores
| GitHub_M | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
PrestaShop is an Open Source e-commerce platform. In versions from 1.6.0.10 and before 1.7.8.7 PrestaShop is subject to an SQL injection vulnerability which can be chained to call PHP's Eval function on attacker input. The problem is fixed in version 1.7.8.7. Users are advised to upgrade. Users unable to upgrade may delete the MySQL Smarty cache feature.
GitHub Advisory Database
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):
if (Configuration::get('PS_SMARTY_CACHING_TYPE') == 'mysql') {
include _PS_CLASS_DIR_.'Smarty/SmartyCacheResourceMysql.php';
$smarty->caching_type = 'mysql';
}
NVD (es)
PrestaShop es una plataforma de comercio electrónico de código abierto. En las versiones a partir de 1.6.0.10 y anteriores a 1.7.8.7, PrestaShop está sujeta a una vulnerabilidad de inyección SQL que puede ser encadenada para llamar a la función Eval de PHP en la entrada del atacante. El problema ha sido solucionado en versión 1.7.8.7. Es recomendado a usuarios actualizar. Los usuarios que no puedan actualizar pueden eliminar la función de caché MySQL Smarty
References
| https://github.com/PrestaShop/PrestaShop/security/advisories/GHSA-hrgx-p36p-89q4 | mitigation, third-party-advisory, web | |
| https://github.com/PrestaShop/PrestaShop/commit/b6d96e7c2a4e35a44e96ffbcdfd34439b56af804 | patch, third-party-advisory, web | |
| https://github.com/PrestaShop/PrestaShop/releases/tag/1.7.8.7 | release-notes, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-31181 | advisory | |
| https://github.com/PrestaShop/PrestaShop | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-31181 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hrgx-p36p-89q4 changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2022-31181 changed 2026-06-17 | Public domain |