Security and SSL
2022 historical alert about a PrestaShop attack chain
This document keeps historical context. Do not apply the manual patches published during the alert today: the 2022 branches and mitigations have been superseded.
On 22 July 2022 PrestaShop warned of attacks that chained an SQL injection vulnerability with writing code through Smarty's MySQL cache.
Exploitation first required an SQL injection path. PrestaShop flagged a risk for shops from 1.6.0.10 onwards when the core, a module or custom code provided that path; version 1.7.8.2 or later was not to be considered vulnerable on its own without checking its modules and customisations. Later versions also hardened the affected cache.
What to do if a shop may have been exposed
- Put it into maintenance mode and preserve files, database and logs before changing anything.
- Identify the exact version, modules, theme and custom code. Migrate unsupported branches to a currently maintained version.
- Review the whole account, not just
config/smarty.config.inc.php: look for modified files, users, scheduled tasks, the database, credentials and other websites on the same hosting. - Set aside your findings in a reversible way and reinstall the core, modules and theme from official sources or known-good copies.
- Close the entry point, rotate exposed credentials and verify the result with logs, integrity checks and functional tests.
Updating or removing the historical Smarty block does not prove that an already compromised shop is clean. Do not leave configuration copies or patches with predictable names inside a public directory.
When investigating, keep the context of each finding: path, date, version and relationship to the requests observed. A file with the same name as an indicator published in 2022 may be a clue, but its absence does not rule out an intrusion.
Prepare the update on an isolated copy and check orders, payments and tasks before reopening. Do not restore over a live shop without deciding how to preserve the transactions made after the backup.
You may also find useful
- Historical notice about mass registrations in PrestaShop 1.6 and 1.7 Documents the flaw fixed in PrestaShop 1.6.1.24 and 1.7.5.2 and explains what to do if you still fin...
- Change the login URL with WPS Hide Login Shows how to change the login path with WPS Hide Login, its limits as a security control and how to...
- Configure session cookie security in GLPI Check HTTPS and GLPI's effective PHP configuration to resolve Secure cookie warnings, without confus...
- Detect and replace unmaintained WordPress plugins Explains how to detect abandoned plugins or themes from their compatibility and last update, and why...
Something wrong or out of date? Tell us and we will review it.