PrestaShop eval injection possible if shop vulnerable to SQL injectionGHSA-hrgx-p36p-89q4
CRITICALFix: PrestaShop/PrestaShop@b6d96e7GHSA-hrgx-p36p-89q4 is a critical-severity (CVSS 9.8) CWE-74 vulnerability in prestashop/prestashop. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for prestashop/prestashop — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-hrgx-p36p-89q4.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
prestashop/prestashopReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
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):
if (Configuration::get('PS_SMARTY_CACHING_TYPE') == 'mysql') {
include _PS_CLASS_DIR_.'Smarty/SmartyCacheResourceMysql.php';
$smarty->caching_type = 'mysql';
}
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | prestashop/prestashop | ≥ 1.6.0.10&&< 1.7.8.7 | 1.7.8.7composer require prestashop/prestashop:^1.7.8.7 |
Affected Products
prestashopprestashopResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for prestashop/prestashop, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update prestashop/prestashop to 1.7.8.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hrgx-p36p-89q4 is resolved across your whole dependency graph.
Workarounds
Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.
How to detect GHSA-hrgx-p36p-89q4
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id ghsa-hrgx-p36p-89q4 -u https://target- Template
- PrestaShop - SQL Injection to Eval Injection
- Severity
- critical
- Impact
- Attackers can execute arbitrary PHP code, leading to remote code execution and full system compromise
- Remediation
- Upgrade to version 1.7.8.7 or later. Alternatively, delete the MySQL Smarty cache feature if upgrade is not possible.
Template by ProjectDiscovery nuclei-templates (daffainfo), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is GHSA-hrgx-p36p-89q4 in your dependencies?
Find it across Packagist, including transitive dependencies.