Loading...
Skip to main content

CVE-2022-31181 — Vulnerability in prestashop/prestashop — CVE Details

CRITICAL

PrestaShop eval injection possible if shop vulnerable to SQL injection

Published July 29, 2022Updated November 8, 2023Source: osv

Summary

### 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'; } ```

Advisory Timeline

  • First published July 29, 2022 (1536 days ago).
  • Last revised November 8, 2023 — 466 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update prestashop/prestashop to 1.7.8.7 or later
composer require "prestashop/prestashop:^1.7.8.7"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: packagist (1).

PackageEcosystemAffectedFixed In
prestashop/prestashop
packagist
1.7.0.0, 1.7.0.0-beta.1.0, 1.7.0.0-beta.2.0, 1.7.0.0-beta.3.0 (+70 more)1.7.8.7

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2022-31181?
PrestaShop eval injection possible if shop vulnerable to SQL injection This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2022-31181?
CVE-2022-31181 affects prestashop/prestashop. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-31181 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-hrgx-p36p-89q4

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies