{"id":"CVE-2026-54159","aliases":["CVE-2026-54159","GHSA-m5f5-28qr-9g9r"],"related":[],"kind":"vulnerability","state":"published","title":"ps_facetedsearch: PHP Object Injection in faceted search cache allows unauthenticated RCE","summary":"PrestaShop ps_facetedsearch is a module that adds layered navigation filters. From 3.0.0 until 4.0.4, the ps_facetedsearch module rebuilds selected search filters from the request URL, and the value of a slider filter, price or weight, is taken from the URL without sufficient validation and stored in an internal filter-block cache where it is serialized and later read back with a raw native unserialize() in src/Filters/Block.php. By crafting that value, an unauthenticated attacker can smuggle a malicious serialized PHP object into the cache, and when it is deserialized, a gadget chain writes an arbitrary PHP file inside the modules/ps_facetedsearch/ directory, which is then used as a webshell to run commands on the server. This issue is fixed in version 4.0.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"PrestaShop ps_facetedsearch is a module that adds layered navigation filters. From 3.0.0 until 4.0.4, the ps_facetedsearch module rebuilds selected search filters from the request URL, and the value of a slider filter, price or weight, is taken from the URL without sufficient validation and stored in an internal filter-block cache where it is serialized and later read back with a raw native unserialize() in src/Filters/Block.php. By crafting that value, an unauthenticated attacker can smuggle a malicious serialized PHP object into the cache, and when it is deserialized, a gadget chain writes an arbitrary PHP file inside the modules/ps_facetedsearch/ directory, which is then used as a webshell to run commands on the server. This issue is fixed in version 4.0.4.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nA PHP Object Injection vulnerability affects the PrestaShop module `ps_facetedsearch`.\n\nThe module rebuilds the selected search filters from the request URL. The value of a slider filter (**price** or **weight**) is taken from the URL without sufficient validation, then stored in an internal filter-block cache where it is serialized and later read back with a raw native `unserialize()`.\nBy crafting that value, an attacker can smuggle a malicious serialized PHP object into the cache. When it is deserialized, a gadget chain writes an arbitrary PHP file inside the module directory, which is then used as a webshell to run commands on the server.\n\n### Who is impacted\n\nAny shop using a vulnerable version of `ps_facetedsearch` that displays a filter template containing a slider filter (price or weight). Exploitation is remote and **unauthenticated**, a single crafted front-office request is enough, and leads to remote code\nexecution and full compromise of the shop and its server.\n\n**Affected versions:** `3.0.0` through `4.0.3` (all versions since 3.0.0, including the latest release).\n\n\n### Patches\n\nUpgrade the `ps_facetedsearch` module to the patched version. Upgrading the module is the best action that removes the vulnerability.\n\nOtherwise, you can apply the fix manually in the file `src/Filters/Block.php`:\n\nIn the `getFromCache()` method, replace the native `unserialize()` call:\n\n```php\n// Before\nif (!empty($row)) {\n    return unserialize(current($row));\n}\n\n// After\nif (!empty($row)) {\n    return \\Tools::unSerialize(current($row));\n}\n```\n\n### Until the module is upgraded:\n\n- Remove price and weight slider filters from the filter templates that are exposed on the\n  front office.\n- Clear the faceted-search filter cache, and audit the `modules/ps_facetedsearch/` directory for\n  unexpected PHP files.\n- Monitor search requests for PHP serialization patterns (`O:`, `;i:`, references to classes such\n  as `Monolog\\…`) and block them at the WAF level.\n\n### Resources\n\n- Thank you to Frédéric Moreau (Antadis) and Gilles Caudal (Datalinx) for reporting this vulnerability.","format":"markdown","source":"ghsa"},{"lang":"es","text":"PrestaShop ps_facetedsearch es un módulo que añade filtros de navegación por capas. Desde la versión 3.0.0 hasta la 4.0.4, el módulo ps_facetedsearch reconstruye los filtros de búsqueda seleccionados a partir de la URL de la solicitud, y el valor de un filtro deslizante, precio o peso, se toma de la URL sin validación suficiente y se almacena en una caché interna de bloques de filtro donde se serializa y luego se vuelve a leer con una función unserialize() nativa en bruto en src/Filters/Block.php. Al manipular ese valor, un atacante no autenticado puede introducir un objeto PHP serializado malicioso en la caché, y cuando se deserializa, una cadena de gadgets escribe un archivo PHP arbitrario dentro del directorio modules/ps_facetedsearch/, que luego se utiliza como una webshell para ejecutar comandos en el servidor. Este problema se corrige en la versión 4.0.4.","source":"nvd"}],"published":"2026-07-10T20:36:56.000Z","modified":"2026-10-24T20:10:00.137Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"}],"cwes":["CWE-74"],"affected":[{"ranges":[{"version":">= 3.0.0, < 4.0.4","status":"affected"}],"vendor":"PrestaShop","product":"ps_facetedsearch","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0","status":"affected","fixed":"4.0.4"}],"ecosystem":"Packagist","package":"prestashop/ps_facetedsearch","purl":"pkg:composer/prestashop/ps_facetedsearch","source":"ghsa"}],"references":[{"url":"https://github.com/PrestaShop/ps_facetedsearch/security/advisories/GHSA-m5f5-28qr-9g9r","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/PrestaShop/ps_facetedsearch/commit/9ca839fac68a60641d8187a3ff9730ab09af33cb","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/PrestaShop/ps_facetedsearch/releases/tag/v4.0.4","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/PrestaShop/ps_facetedsearch","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-07-20T13:55:55.290Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54159","url":"https://www.cve.org/CVERecord?id=CVE-2026-54159","licence":"CVE Terms of Use","modified":"2026-07-20T13:56:07.400Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-m5f5-28qr-9g9r","url":"https://github.com/advisories/GHSA-m5f5-28qr-9g9r","licence":"CC-BY-4.0","modified":"2026-07-10T20:56:35.754Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54159","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54159","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"}],"updatedAt":"2026-11-25T22:59:28.575Z","epss":{"score":0.00509,"percentile":0.4494,"date":"2026-12-01T12:00:22.000Z"}}