79% vs 51%: independent neobanks lag on app security. Read the report

Deep Dive

Deep Dive

LiteSpeed Cache for PrestaShop RCE via ESI (CVE-2026-129968)

LiteSpeed Cache for PrestaShop before 1.6.2 renders an attacker-supplied Smarty template through its ESI endpoint; fixed in 1.6.2.

TL;DR

  • LiteSpeed Cache for PrestaShop decodes a pd request value into a Smarty template name and renders it. A crafted value can name a Smarty string: or file: resource instead of a real template file.
  • Every module release before 1.6.2 is affected. The module is the free LiteSpeed cache module for PrestaShop, a platform that reports 250,000 merchants.
  • CERT Polska rates the flaw CVSS v4.0 9.3 Critical and describes unauthenticated store takeover. The CVE record carries the x_known-exploited-vulnerability tag, CISA ADP says exploitation none, and the CVE is not in KEV as of 2026-11-26.
  • Update the module to 1.6.2 or later and purge the cache. See "How do I fix it?" for the workaround when the update has to wait.

Am I affected?

You are exposed when a PrestaShop store runs the LiteSpeed Cache module before 1.6.2 and the module's ESI endpoint is reachable from the network. All of these conditions must hold:

  • The store runs PrestaShop 1.6 or later with the LiteSpeed Cache module installed.
  • The installed module is 1.6.1 or earlier.
  • The store runs on LiteSpeed Web Server Enterprise or LiteSpeed WebADC. The module does not work with OpenLiteSpeed, because OpenLiteSpeed does not support the Edge Side Includes feature the module uses.
  • The esi front controller is reachable at the store URL. The module puts that controller in its own esi:include tags, and a normal store serves it.

The module is free and open source, but it is an interface to the LiteSpeed server cache. A store without the LiteSpeed server module cannot run it, so a plain Apache or nginx PrestaShop store is not exposed to this module flaw.

Product Affected versions Fixed version
LiteSpeed Cache for PrestaShop 1.6.1 and earlier 1.6.2

Check the installed module version in the PrestaShop database. The table prefix is usually ps_, and it is different on some installs:

SELECT version FROM ps_module WHERE name = 'litespeedcache';

You can also read the version from the module manifest:

grep -m1 '<version>' modules/litespeedcache/config.xml

On a store that runs the module, the ESI controller answers at a URL like this one:

https://shop.example/index.php?fc=module&module=litespeedcache&controller=esi

A request without a pd value does not return a version string, so the URL is not a reliable version check on its own. Use the database or the manifest.

How do I fix it?

Update the module to 1.6.2 or later, then purge the LiteSpeed cache. LiteSpeed labels 1.6.2 an emergency security update and released it on 2026-10-30.

  1. Back up the store files and database.
  2. In the PrestaShop back office, open Module Manager and update LiteSpeed Cache to 1.6.2. If the back office cannot reach the update server, download release 1.6.2 from the module's GitHub releases and upload the archive in Module Manager.
  3. Confirm the version with the SQL query or the manifest command from "Am I affected?".
  4. Purge the LiteSpeed cache and the PrestaShop cache. Cached pages generated before the update contain ESI URLs without the new signature, so their fragments fail until the pages are regenerated.
  5. Load the store front page and a product page, then confirm that the cart and account fragments render.

If you deploy the module from a Git checkout or a build pipeline, pin it to the 1.6.2 tag and redeploy the modules/litespeedcache directory. Copying a new config.xml without the PHP files does not fix the controller.

If you cannot update at once, stop external access to the esi controller at the web server or the load balancer. ESI fragments are fetched by the LiteSpeed server itself. Blocking direct client requests to index.php?fc=module&module=litespeedcache&controller=esi therefore removes the remote path.

The limit is that a request that reaches the origin another way is still exposed. Disabling the module is the other option, and it costs the page cache.

What is the root cause?

The module's esi front controller decodes a pd request value as JSON and uses its fields without authenticating them. For the mf fragment type, the t field becomes the argument to Smarty's fetch().

LiteSpeedCacheEsiItem::decodeEsiUrl() reads the value and checks only that the JSON parses and that a few keys exist. This is the check in classes/EsiItem.php lines 237 to 260 of version 1.6.1:

public static function decodeEsiUrl()
{
    $err = $pd = $param = $conf = null;

    if (($pd = Tools::getValue('pd')) == null) {
        $err = 'missing pd';
    } elseif (($param = json_decode($pd, true)) == null) {
        $err = 'invalid format in pd';
    } elseif (!isset($param['pt'])) {
        $err = 'missing pt';
    } elseif (!isset($param['m'])) {
        $err = 'missing m';
    } elseif (($conf = LiteSpeedCacheConfig::getInstance()->getEsiModuleConf($param['m'])) == null) {
        $err = $param['m'] . ' is not found';
    } else {

There is no signature, no origin check and no type check beyond isset. The m value must name a module that has an ESI configuration, and the module configuration has a default case that accepts the mf fragment type. The controller then dispatches the fragment to processWidgetBlock().

This is the sink in controllers/front/esi.php lines 158 to 170 of version 1.6.1:

private function processWidgetBlock($item)
{
    $params = [];
    if (($module = $this->initWidget($item->getParam('m'), $params)) == null) {
        $item->setFailed();
    } else {
        $this->handleModuleVariables($params, $item);

        $this->context->smarty->assign($module->getWidgetVariables('', $params));

        $item->setContent($this->context->smarty->fetch($item->getParam('t')));
    }
}

$item->getParam('t') is the t field of the decoded JSON, so it is attacker input. Smarty's fetch() accepts a resource string, not only a file path. string: treats the rest of the value as template source, and file: reads an arbitrary file as a template. The code does not require the value to start with module: or to end in .tpl.

A string: template is compiled and evaluated by Smarty. The module's own patch comment calls the result "template injection -> RCE", because a template can reach PHP functions and static methods allowed by the installed Smarty security policy. The exact functions available depend on the Smarty version and policy, but the attacker controls the template source, which is the condition that turns template injection into code execution.

The ch fragment type has a related sink. processCallHook() takes the mt field and calls $module->$method($params) with no allowlist, so a crafted value can call a public method on the module object. That is the second sink the 1.6.2 release closes.

How is it exploited?

An unauthenticated attacker sends a crafted pd value to the esi controller. The controller decodes it, selects the mf fragment path and renders the attacker's t value as a Smarty template.

  1. The attacker finds a store that runs LiteSpeed Cache before 1.6.2 and serves the esi controller.
  2. The attacker sends a GET request to index.php?fc=module&module=litespeedcache&controller=esi with a URL-encoded JSON pd value.
  3. The JSON names a module that has an ESI configuration, sets pt to mf, sets f to widget_block and supplies a t value that names a Smarty resource rather than a real template.
  4. decodeEsiUrl() accepts the value because the JSON parses and the required keys exist.
  5. The controller calls processWidgetBlock(), which passes t to $this->context->smarty->fetch().
  6. Smarty compiles the supplied template and evaluates it in the store process, which runs the code the template selects.
  7. The attacker receives the rendered output from the controller and has code execution as the web server user.

No public proof of concept is published as of 2026-11-26. The CVE record carries the x_known-exploited-vulnerability tag, while the CISA ADP block records Exploitation as none and neither CERT Polska nor LiteSpeed reports exploitation. Treat the in-the-wild status as unconfirmed.

CERT Polska describes the result as potential full control of the store and access to customer and payment data. This post does not include a working template payload.

The ch fragment type reaches the same impact through mt. The attacker supplies a method name that the module object implements, and the controller calls it.

How does the attack flow?

An unsigned pd value selects the widget-block fragment path, its t field becomes a Smarty resource, and Smarty evaluates the attacker's template inside the store process.

flowchart LR A["Unauthenticated GET to the esi controller"] --> B["pd JSON decoded with no signature"] B --> C["pt=mf selects the widget-block path"] C --> D["t passed to Smarty fetch"] D --> E["No check for a real .tpl file"] E --> F["Smarty compiles the attacker template"] F --> G["Code runs as the web server user"]

What can an attacker do?

A successful attack runs code in the store process as the web server user. From there the attacker can read the store configuration, reuse the database credentials and write files the process can write.

The impact needs these conditions:

  • The store runs the module before 1.6.2.
  • The esi controller is reachable from the attacker's network.
  • A module with an ESI configuration is enabled, so the m value resolves.
  • The installed Smarty version and security policy allow the functions the template uses.

The CERT Polska entry describes the impact as potential full control of the store and access to customer and payment data. That is consistent with code execution in the store process. The process can read the PrestaShop configuration file that holds the database credentials (app/config/parameters.php on 1.7 and later, config/settings.inc.php on 1.6).

An attacker who reaches code execution can create an administrator account, modify a payment module, or copy the customer and order tables. The store's payment integration credentials are also reachable from the same process.

Why does the fix work?

The 1.6.2 release authenticates the pd value and restricts what the fragment can render. The module now signs every ESI URL it generates with a key derived from the shop secret.

classes/Helper.php adds the signature:

public static function esiSignature($pd)
{
    $moduleInstance = Module::getInstanceByName(LiteSpeedCache::MODULE_NAME);
    $moduleId = $moduleInstance->id;

    $key = _COOKIE_KEY_ . '|' . $moduleId . '|' . _PS_ROOT_DIR_ ;

    return Tools::substr(hash_hmac('sha256', 'lsc_esi|' . (string) $pd, $key), 0, 32);
}

genEsiElements() now appends &sig= with that value to every esi:include URL. decodeEsiUrl() rejects a request whose sig is missing or does not match:

$pd = isset($_GET['pd']) && is_string($_GET['pd']) ? $_GET['pd'] : null;

if ($pd === null || $pd === '') {
    $err = 'missing pd';
} elseif (!isset($_GET['sig']) || !is_string($_GET['sig'])
    || !hash_equals(LiteSpeedCacheHelper::esiSignature($pd), $_GET['sig'])) {
    $err = 'invalid signature';
}

hash_equals() compares the two values in constant time. The key includes the shop cookie key, the module id and the PrestaShop root directory, so a signature made on another shop does not validate.

The second half of the fix restricts the template. processWidgetBlock() now requires the t value to match ^module:[A-Za-z0-9_\-/.]+\.tpl$ and rejects any value containing ..:

if (!preg_match('#^module:[A-Za-z0-9_\-/.]+\.tpl$#', $tpl) || strpos($tpl, '..') !== false) {
    $item->setFailed('invalid template');

    return;
}

That removes the string:, file: and eval: resources. processCallHook() also checks that mt matches hook[A-Za-z0-9_]+ or renderWidget and that the method exists on the module.

The signature is the complete fix for unsigned requests. The template and method checks are defence in depth for a request whose signature is valid, for example one generated by a compromised module.

How do I check if I was compromised?

The module publishes no indicators of compromise. These checks look for requests to the ESI controller that the shop itself would not generate.

Search the access log for esi requests that carry pd but no sig:

grep -E 'controller=esi' access.log | grep -v 'sig=' | head -50

Decode the pd values in the hits and look for a t field that does not start with module::

grep -Eo 'pd=[^& ]+' access.log | sed 's/^pd=//' | python3 -c 'import sys,urllib.parse;[print(urllib.parse.unquote(l.strip())) for l in sys.stdin]' | grep -E '"t":"(string|file|eval):'

A hit is a lead, not proof. A request that failed at the signature check still appears in the log. The absence of hits does not prove a clean store, because old logs may have rotated.

Also review the PrestaShop administrator list, the installed modules and the theme files for changes you did not make. A code-execution attacker usually needs a second step to persist, and a new administrator account or a modified payment module is that step.

Timeline

  • 2026-10-23: the security changes are written in the module source.
  • 2026-10-30: LiteSpeed releases module 1.6.2 as an emergency security update.
  • 2026-11-25: CERT Polska publishes the vulnerability entry and the CVE record.

LiteSpeed wrote the security fix on 2026-10-23 and shipped 1.6.2 a week later
Figure 1: Module 1.6.2 on 2026-10-30, seven days after the security changes, and the CVE record 26 days later. Source: LiteSpeed module source, LiteSpeed download page and CERT Polska, checked November 26, 2026

FAQ

Does the flaw affect PrestaShop itself?

No. It is in the LiteSpeed Cache module's esi controller. A PrestaShop store without the module is not exposed.

Does the attack need a customer or administrator account?

No. The esi controller decodes pd before any authentication, and CERT Polska describes the attack as unauthenticated.

Does it work on OpenLiteSpeed?

No. The module needs Edge Side Includes, which OpenLiteSpeed does not support. A LiteSpeed Web Server Enterprise or WebADC deployment is required.

Is there a public exploit?

No public proof of concept is published as of 2026-11-26. The CVE record carries the x_known-exploited-vulnerability tag, while the CISA ADP block records Exploitation as none; treat in-the-wild exploitation as unconfirmed.

Will updating break cached pages?

Cached pages generated before the update contain unsigned ESI URLs. Their fragments fail until the cache is purged and the pages are regenerated, so purge the cache as part of the update.

Which versions are fixed?

1.6.2 and later. The release is dated 2026-10-30 on the LiteSpeed download page and 2026-11-01 on the GitHub tag.

References

  • CERT Polska, "Vulnerability in LiteSpeed Cache Plugin for Prestashop software", published November 25, 2026 (checked November 26, 2026): https://cert.pl/en/posts/2026/11/CVE-2026-129968
  • CVE record, CVE-2026-129968, published November 25, 2026 (checked November 26, 2026): https://www.cve.org/CVERecord?id=CVE-2026-129968
  • LiteSpeed Technologies, LSCache for PrestaShop download page, release 1.6.2 dated October 30, 2026 (checked November 26, 2026): https://www.litespeedtech.com/products/cache-plugins/prestashop-acceleration/download
  • LiteSpeed Technologies, LSCache for PrestaShop product page (checked November 26, 2026): https://www.litespeedtech.com/products/cache-plugins/prestashop-acceleration
  • Module source at v1.6.1, controllers/front/esi.php (checked November 26, 2026): https://github.com/litespeedtech/lscache_prestashop/blob/v1.6.1/controllers/front/esi.php
  • Module source at v1.6.2, controllers/front/esi.php (checked November 26, 2026): https://github.com/litespeedtech/lscache_prestashop/blob/v1.6.2/controllers/front/esi.php
  • Module source at v1.6.2, classes/Helper.php (checked November 26, 2026): https://github.com/litespeedtech/lscache_prestashop/blob/v1.6.2/classes/Helper.php
  • Module source at v1.6.1, classes/EsiItem.php (checked November 26, 2026): https://github.com/litespeedtech/lscache_prestashop/blob/v1.6.1/classes/EsiItem.php
  • PrestaShop, "250,000 merchants" on the platform home page (checked November 26, 2026): https://www.prestashop.com/en
  • CISA, Known Exploited Vulnerabilities Catalog, catalog version 2026.11.25 (checked November 26, 2026): https://www.cisa.gov/known-exploited-vulnerabilities-catalog

Free scan

Scan your own app for free

or book a demo

Keep reading

Related articles

Browse the blog