CVE-2022-31181: PrestaShop eval injection possible if shop vulnerable to SQL injection
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.9214%
CWE
Published
7/29/2022
Updated
1/27/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
prestashop/prestashop | composer | >= 1.6.0.10, < 1.7.8.7 | 1.7.8.7 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability chain requires: 1. SQL injection to modify cached content (CWE-89), and 2. Evaluation of that content via Smarty
(CWE-95). The pre-patch versions lacked encryption in these methods, making cached content manipulable through SQL injection. The commit added encryption/decryption to prevent code injection via cached content. These functions
directly handle the storage and retrieval of template cache data that gets evaluated by Smarty
, making them the critical vulnerable components.