Advisory

GHSA-hrgx-p36p-89q4

Also known as: CVE-2022-31181

Summary

PrestaShop eval injection possible if shop vulnerable to SQL injection

Details

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

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2022-07-29 22:27 UTC
Modified
2023-11-08 04:09 UTC

Affected packages and fixes

prestashop/prestashop

Packagist · All systems

Affected

  • introduced 1.6.0.10, fixed 1.7.8.7 (ecosystem)

Fixed versions

1.7.8.7

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences