✕BlockStrap: VULN-39341 is not enough (13/10/2026)

BlockStrap (CVE-2026-103849, CVSS 10.0) gets past the StyleSmuggler fix through the same template engine. Adobe fixed it in the October isolated patch, APSB26-153. You need both: VULN-39341 first, then the October patch (how). Sansec had seen no BlockStrap attacks on live stores as of their 15th October write-up, and reproduced four exploit routes within 24 hours of the patch.

✓Adobe has shipped a patch: VULN-39341 (08/09/2026)

Apply Adobe’s patch (how). It supersedes the containment patch below; revert that first, never run both. Composer patches for 2.4.4 to 2.4.9, older patch levels included. A patch does not clean an infected node. The hunting and recovery steps below still apply.

TL;DR

Revert any interim containment patch, then apply Adobe’s VULN-39341 patch and the October APSB26-153 patch for BlockStrap. Hunt all three implant builds (gvfsd-user, fc-cache, chronyd) and the later gs-netcat and WraithC2 tooling, and rebuild anything that comes back dirty. Patching does not clean an infected node.

Last updated: 2nd November 2026. Added BlockStrap (CVE-2026-103849), which VULN-39341 does not fix, and Sansec’s indicators for the tooling found on a store compromised on 9th September.

StyleSmuggler (CVE-2026-75650), tracked by Adobe as VULN-39341 and shipped in bulletin APSB26-146, is an unauthenticated Magento RCE: attacker-controlled data is written into a report or log file, then evaluated by a later request. Adobe patched it on 7th September, three days after exploitation started. Being current did not protect you before that.

Sansec found it, reproduced it and are still investigating. Their post is the source for everything here, and the only thing updated in real time. This is the runbook I’m running across my Magento fleets: what to check, what to change, what to do when a node comes back dirty.

Emergency checklist

For every production environment:

  1. Revert the interim containment patch, apply the correct VULN-39341 patch for your Magento version, then the October isolated patch (APSB26-153) for BlockStrap. Rotate the encryption key and the credentials it protects.
  2. Keep Sansec Shield current during the rollout.
  3. Block public GraphQL if your storefront and integrations do not use it.
  4. Hunt every node for all three implant names (gvfsd-user, fc-cache, chronyd) and the 9th September toolkit: gs-netcat, WraithC2, a backdoored View.php and a skimmer in core_config_data.
  5. Inspect existing var/report, var/report/api, var/log and pub/media files before changing them.
  6. Compile DI, recycle PHP-FPM and OpCache, then verify from outside the origin.
  7. Isolate and rebuild any compromised node. Removing the visible process is not recovery.

Update 07/09/2026: multiple implant identifiers

Sansec have documented three names for the same implant in four days.

Originalfc-cache (06/09)chronyd (07/09)
Process[kworker/u:8:0]fc-cachechronyd
Drop path~/.local/share/.gvfsd/gvfsd-user~/.cache/fontconfig/fc-cache/tmp/.chrony-<8hex>/chronyd
Lock~/.local/share/.gvfsd/.gvfsd_<8hex>.lock/tmp/.fc_<8hex>.locknone documented
Cron*/5 * * * *13,43 * * * *57,27 * * * * on one host, none on another (self-relaunching)
Versionnot published2.1.42.1.5

Two things about the chronyd build matter more than the rename.

An empty crontab is no longer evidence of a clean host. On one host it had no cron entry and its parent was PID 1: it relaunched itself. On another it wrote 57,27 * * * * straight into the cron spool. Every cron-based check published so far, mine included, can pass on an infected host.

The name is chosen to defeat the obvious hunt. Anyone filtering UDP/123 for NTP-shaped C2 has already whitelisted chronyd as the legitimate time daemon. That exclusion hides this build completely.

Sansec give a beacon fingerprint that separates it from a real NTP client: nine 48-byte datagrams roughly 10 ms apart every 60 seconds, where a real client sends one, and every datagram marked NTPv4 server mode, which a client has no reason to send.

Removal is unchanged: persistence first where it exists, then the process, then rebuild the node. See recovery: a renamed implant is the same compromise.

The checks and the IOC list below cover all three builds.

Have I Been Compromised?

Run these checks as the Magento filesystem user, then repeat the process and socket checks as root.

crontab -l | grep -iE 'gvfsd|fontconfig|fc-cache|chrony'
grep -rlE 'gvfsd|fc-cache|chronyd' /var/spool/cron/ 2>/dev/null
ls -la ~/.local/share/.gvfsd/ ~/.cache/fontconfig/fc-cache \
       /tmp/.kw_* /tmp/.cache_* /tmp/.gvfsd[-_]* /tmp/.fc[-_]* /tmp/fc-cache \
       /tmp/.chrony-*/chronyd 2>/dev/null
ps -eo user,pid,ppid,comm,args | awk '$1 != "root" && ($4 ~ /kworker|fc-cache|chronyd|kstrp|ksmd/ || ($3 == 1 && $4 ~ /sshd|bash/))'
grep -r 'crontab command not allowed' /var/log/
find -L pub/media -type f -name '*.php'
grep -Ral -e 'X_TRACE_' -e 'X-TRACE-' var/report/ var/log/
grep -Ral --fixed-strings '<?' var/report/ var/log/
grep -Fal 'array_merge()' var/log/system.log

Disrex found successful infections using var/log/system.log, so search both var/report and var/log. The commands match both marker spellings, both lock-file separators and all three builds. The implant can also write straight into /var/spool/cron/.

The array_merge() error is the strongest application-level signal: it means Magento’s DI scanner included a poisoned file. No matches do not prove a host is clean; resolve unreadable paths and scan errors before continuing.

~/.local/share/.gvfsd/ and ~/.cache/fontconfig/ are the PHP-FPM user’s home, not root’s. Check every account on shared hosting. Normal kworker processes are root-owned; one running as the Magento user is an IOC. fc-cache and chronyd are real binaries, so check what the process resolves to before acting on the name.

A store compromised on 9th September had different tooling again, documented by Sansec: gs-netcat dropped as pub/defunct, the WraithC2 RAT running as sshd: apache@notty, -bash and [kworker/u16:2] (all with parent PID 1), a cookie-triggered remote include edited into vendor/magento/framework/App/View.php, and a base64 skimmer in design/head/includes on every store view. Wraith kept its binaries in PHP-FPM’s systemd private /tmp, which is not the /tmp a shell sees.

ls -la pub/defunct defunct defunct.dat 2>/dev/null
grep -c gl_google_advisor vendor/magento/framework/App/View.php          # anything but 0 is the backdoor
ls -la /tmp/systemd-private-*-php-fpm.service-*/tmp/                     # as root: PHP-FPM's private /tmp
grep -aFc 'Laminas\Loader\Exception\InvalidArgumentException' var/log/exception.log   # one per stage-2 attempt

Then, against the store database:

SELECT scope, scope_id, value FROM core_config_data WHERE path = 'design/head/includes';

Look for a base64 blob or a POST to any of the skimmer hosts in the IOC list. exception.log outlives access-log rotation, so it is the best record of attempts; halve the count where Magento_Support is enabled, as it logs every exception twice.

For each suspicious PID, capture:

readlink -v /proc/<pid>/exe
readlink -v /proc/<pid>/cwd
sha256sum /proc/<pid>/exe
lsof -nP -a -p <pid>
ss -plantu

On one affected node I found a non-root [kworker/u:8:0] resolving to ~/.local/share/.gvfsd/gvfsd-user, running from Magento’s pub directory and connected to local Redis. The on-disk and in-memory hashes differed, so hash /proc/<pid>/exe as well as the file.

For the fc-cache build, readlink /proc/<pid>/exe pointing at ~/.cache/fontconfig/fc-cache is the confirmation. Collect what you need before attaching a debugger: the implant checks whether it’s traced and goes quiet.

⚠️Collect evidence before you kill anything

Drain the node and restrict outbound traffic. Preserve /proc/<pid>/exe, its hash, process metadata, sockets, cron and relevant logs. Capture memory if your incident process supports it, and protect the evidence as sensitive data.

Remove persistence before killing the process or it will recreate itself. Do not reboot or run composer install: both can destroy useful evidence. Rebuild the node from a trusted image.

How to mitigate StyleSmuggler

This attack needs several layers of containment.

1. Sansec Shield

Sansec Shield has a live virtual patch, updated as the campaign changes. One Disrex victim was breached before the rules landed, so Shield shrinks the exposure window; it does not replace threat hunting.

2. Block GraphQL if you don’t use it

If you don’t use GraphQL, block the complete route at every public ingress: plain and index.php URLs, store prefixes, direct origin access. Don’t rely on payload signatures.

Stores that do use it are down to Shield and the patch below. Blocking the route does not clean existing poisoned files or infected hosts.

3. Apply Adobe’s patch (VULN-39341)

Adobe shipped VULN-39341 (CVE-2026-75650) on 7th September 2026 as APSB26-146, with composer patches for 2.4.4 to 2.4.9, older patch levels included. Adobe’s announcement and download links map each version to its patch file. There is no Adobe patch for 2.2, 2.3 or 2.4.0 to 2.4.3; Scandiweb backported the fix to 41 of those versions, which Sansec have not reviewed. Adobe’s September isolated patch (APSB26-138) does not include this fix, so apply both. Adobe also says to rotate the encryption key and every credential it protects, at the source rather than only inside Magento. This is the fix to run. Everything below it is superseded and kept only for stores mid-rollout.

# revert any interim containment patch FIRST — it touches the same files
patch -p1 -R < stylesmuggler-containment.patch
patch -p1 --forward < VULN-39341_<your-version>.patch
bin/magento setup:di:compile     # BlockFactory gains a constructor argument
systemctl reload php8.5-fpm

One path stays open, unchanged by VULN-39341 (I have not re-tested it against the October patch): {{block class=X}} autoloads X before the type check rejects it, so a .php file written into generated/code or app/code still executes through the directive. It needs a separate file-write bug to reach. Graycore’s patch closes it with a {{block}} allowlist.

Then apply the October patch for BlockStrap. BlockStrap (CVE-2026-103849, CVSS 10.0, found by vozec) is a second-pass directive injection in the same template engine. VULN-39341 signs trusted directives, but attacker data in a child template can still be signed and rescanned at the root level, where a smuggled {{block}} directive runs. Adobe fixed it on 13th October 2026 in APSB26-153, the October isolated patch, by replacing the rescan with registered placeholders. Sansec’s write-up has the detail.

  • The October patch does not contain VULN-39341, and Adobe’s registry does not list it as a prerequisite. Apply VULN-39341 first.
  • Isolated patches apply in release order: July, August, September, then October. The security patches page has the full list.
  • Public Open Source downloads cover 2.4.7-p10, 2.4.8-p5 and 2.4.9 (ka-49323). 2.4.4-p18, 2.4.5-p17 and 2.4.6-p15 need an Adobe Commerce licence; Happy Horizon published backports, with no warranty.
  • On 2.4.8-p5, also apply 248p5-2026-10-002-CE. A copy of the October file downloaded on 13th October lacks a change for CVE-2026-91013, which Adobe published separately.
  • Mage-OS is affected up to 3.5.0. Mage-OS 3.6.0 contains the fix.

Check both landed. Composer patch plugins and patch ... || true can skip a hunk without failing the deploy:

grep -c resolveDeferredDirectives vendor/magento/framework/Filter/Template.php   # 0 = BlockStrap fix missing
vendor/bin/magento-patches -n status | grep "39341\|Status"                      # StyleSmuggler hotfix

On Mage-OS, check vendor/mage-os/framework/Filter/Template.php instead. The October patch also leaves an empty file named 976bc24c08055e67a58cf491401c8b2f3d48ff55b8092f1ede196bac4756a228 in the Magento root. It is a lock-file bug (magento/magento2#41535), not an IOC.

4. Interim containment patch (superseded)

Kept for stores mid-rollout. Revert it once Adobe’s patch is on.

ℹ️Revision 2 supersedes revision 1

Revert revision 1 before applying revision 2. Never run both.

Revision 1 closed the one disclosed include sink. Revision 2 targets the cause both stages share (a caller-supplied class reaching a constructor before its type is checked) and keeps the sink hardening too, so poisoned reports and logs stay inert either way. Neither has an application-level GraphQL block or a broad Magento\Setup autoloader restriction, because both cause more collateral damage than they prevent.

Push it with your normal patching tooling. I’ve covered patching at scale with Ansible for incident response and meta packages for persistence.

stylesmuggler-containment.patch
diff --git a/vendor/magento/framework/View/Element/BlockFactory.php b/vendor/magento/framework/View/Element/BlockFactory.php
--- a/vendor/magento/framework/View/Element/BlockFactory.php
+++ b/vendor/magento/framework/View/Element/BlockFactory.php
@@ -41,6 +41,18 @@
     public function createBlock($blockName, array $arguments = [])
     {
         $blockName = ltrim($blockName, '\\');
+        // Validate the resolved type before instantiating: the stock order runs an
+        // arbitrary caller-supplied constructor before the type check rejects it.
+        if (!is_string($blockName) || $blockName === '') {
+            throw new \LogicException('Block name must be a non-empty string');
+        }
+        $omConfig = \Magento\Framework\App\ObjectManager::getInstance()
+            ->get(\Magento\Framework\ObjectManager\ConfigInterface::class);
+        $instanceType = $omConfig->getInstanceType($omConfig->getPreference($blockName));
+        if (!is_subclass_of($instanceType, BlockInterface::class)) {
+            throw new \LogicException($blockName . ' does not implement BlockInterface');
+        }
+
         $block = $this->objectManager->create($blockName, $arguments);
         if (!$block instanceof BlockInterface) {
             throw new \LogicException($blockName . ' does not implement BlockInterface');
diff --git a/vendor/magento/module-backend/Model/Widget/Grid/Row/UrlGeneratorFactory.php b/vendor/magento/module-backend/Model/Widget/Grid/Row/UrlGeneratorFactory.php
--- a/vendor/magento/module-backend/Model/Widget/Grid/Row/UrlGeneratorFactory.php
+++ b/vendor/magento/module-backend/Model/Widget/Grid/Row/UrlGeneratorFactory.php
@@ -36,6 +36,18 @@
      */
     public function createUrlGenerator($generatorClassName, array $arguments = [])
     {
+        if (!is_string($generatorClassName) || $generatorClassName === '') {
+            throw new \InvalidArgumentException('Passed wrong parameters');
+        }
+        // Validate the resolved type before instantiating; the post-construction
+        // check below is kept so both invariants hold.
+        $omConfig = \Magento\Framework\App\ObjectManager::getInstance()
+            ->get(\Magento\Framework\ObjectManager\ConfigInterface::class);
+        $instanceType = $omConfig->getInstanceType($omConfig->getPreference($generatorClassName));
+        if (!is_subclass_of($instanceType, \Magento\Backend\Model\Widget\Grid\Row\GeneratorInterface::class)) {
+            throw new \InvalidArgumentException('Passed wrong parameters');
+        }
+
         $rowUrlGenerator = $this->_objectManager->create($generatorClassName, $arguments);
         if (false === $rowUrlGenerator instanceof \Magento\Backend\Model\Widget\Grid\Row\GeneratorInterface) {
             throw new \InvalidArgumentException('Passed wrong parameters');
diff --git a/vendor/magento/module-email/Model/Template/Filter.php b/vendor/magento/module-email/Model/Template/Filter.php
--- a/vendor/magento/module-email/Model/Template/Filter.php
+++ b/vendor/magento/module-email/Model/Template/Filter.php
@@ -408,6 +408,14 @@
     {
         $skipParams = ['class', 'id', 'output'];
         $blockParameters = $this->getParameters($construction[2]);
+
+        // Authored {{block}} params are always scalar; a non-scalar only arrives
+        // through $var substitution, which is how attacker constructor data gets in.
+        foreach ($blockParameters as $blockParameterValue) {
+            if ($blockParameterValue !== null && !is_scalar($blockParameterValue)) {
+                return '';
+            }
+        }

         $block = null;

diff --git a/vendor/magento/framework/Logger/Handler/Base.php b/vendor/magento/framework/Logger/Handler/Base.php
--- a/vendor/magento/framework/Logger/Handler/Base.php
+++ b/vendor/magento/framework/Logger/Handler/Base.php
@@ -95,6 +95,16 @@
             $this->filesystem->createDirectory($logDir);
         }

+        // StyleSmuggler containment: neutralise PHP open tags so a poisoned log
+        // file is inert whichever include gadget reaches it.
+        if (isset($record['formatted']) && is_string($record['formatted'])) {
+            $record['formatted'] = str_replace(
+                ['<?', '<%'],
+                ['&lt;?', '&lt;%'],
+                $record['formatted']
+            );
+        }
+
         parent::write($record);
     }

diff --git a/vendor/magento/framework/Webapi/ErrorProcessor.php b/vendor/magento/framework/Webapi/ErrorProcessor.php
--- a/vendor/magento/framework/Webapi/ErrorProcessor.php
+++ b/vendor/magento/framework/Webapi/ErrorProcessor.php
@@ -17,6 +17,7 @@
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Framework\Phrase;
 use Magento\Framework\Serialize\Serializer\Json;
+use Magento\Framework\Serialize\Serializer\JsonHexTag;
 use Magento\Framework\Webapi\Exception as WebapiException;

 /**
@@ -96,7 +97,7 @@
         $this->_logger = $logger;
         $this->_filesystem = $filesystem;
         $this->directoryWrite = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
-        $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
+        $this->serializer = $serializer ?: ObjectManager::getInstance()->get(JsonHexTag::class);
         $this->registerShutdownFunction();
     }

diff --git a/pub/errors/processor.php b/pub/errors/processor.php
--- a/pub/errors/processor.php
+++ b/pub/errors/processor.php
@@ -8,7 +8,7 @@
 namespace Magento\Framework\Error;

 use Magento\Config\Model\Config\Reader\Source\Deployed\DocumentRoot;
-use Magento\Framework\Serialize\Serializer\Json;
+use Magento\Framework\Serialize\Serializer\JsonHexTag;
 use Magento\Framework\Escaper;
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\App\Response\Http;
@@ -156,7 +156,7 @@
     /**
      * JSON serializer
      *
-     * @var Json
+     * @var JsonHexTag
      */
     private $serializer;

@@ -172,7 +172,7 @@

     /**
      * @param Http $response
-     * @param Json $serializer
+     * @param JsonHexTag $serializer
      * @param Escaper $escaper
      * @param DocumentRoot|null $documentRoot
      */
@@ -185,7 +185,7 @@
         $this->_response = $response;
         $this->_errorDir  = __DIR__ . '/';
         $this->_reportDir = dirname(dirname($this->_errorDir)) . '/var/report/';
-        $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
+        $this->serializer = $serializer ?: ObjectManager::getInstance()->get(JsonHexTag::class);
         $this->escaper = $escaper ?: ObjectManager::getInstance()->get(Escaper::class);
         $this->documentRoot = $documentRoot ?? ObjectManager::getInstance()->get(DocumentRoot::class);
         if (!empty($_SERVER['SCRIPT_NAME'])) {

Six changes.

  • BlockFactory::createBlock(): resolve preferences and virtual types, check BlockInterface before instantiating. Stock order instantiates first, so the constructor has already run by the time the check fails.
  • UrlGeneratorFactory::createUrlGenerator(): same bug, same fix.
  • Filter::blockDirective(): reject non-scalar {{block}} parameters. Removes the primitive rather than one gadget.
  • Report serializers: JsonHexTag on both writers, so new var/report files carry no raw PHP tags.
  • Logger\Handler\Base::write(): escape PHP open tags, so a poisoned var/log file is inert.

The last two are defence in depth, not the fix. The write side is not reliably containable.

Dropped from revision 1: Io::includeFile(), the three DI scanner guards and PaymentFailuresService::handle().

diff --git a/pub/errors/processor.php b/pub/errors/processor.php
--- a/pub/errors/processor.php
+++ b/pub/errors/processor.php
@@ -8,7 +8,7 @@
 namespace Magento\Framework\Error;

 use Magento\Config\Model\Config\Reader\Source\Deployed\DocumentRoot;
-use Magento\Framework\Serialize\Serializer\Json;
+use Magento\Framework\Serialize\Serializer\JsonHexTag;
 use Magento\Framework\Escaper;
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\App\Response\Http;
@@ -156,7 +156,7 @@
     /**
      * JSON serializer
      *
-     * @var Json
+     * @var JsonHexTag
      */
     private $serializer;

@@ -172,7 +172,7 @@

     /**
      * @param Http $response
-     * @param Json $serializer
+     * @param JsonHexTag $serializer
      * @param Escaper $escaper
      * @param DocumentRoot|null $documentRoot
      */
@@ -185,7 +185,7 @@
         $this->_response = $response;
         $this->_errorDir  = __DIR__ . '/';
         $this->_reportDir = dirname(dirname($this->_errorDir)) . '/var/report/';
-        $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
+        $this->serializer = $serializer ?: ObjectManager::getInstance()->get(JsonHexTag::class);
         $this->escaper = $escaper ?: ObjectManager::getInstance()->get(Escaper::class);
         $this->documentRoot = $documentRoot ?? ObjectManager::getInstance()->get(DocumentRoot::class);
         if (!empty($_SERVER['SCRIPT_NAME'])) {
diff --git a/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php
--- a/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php
+++ b/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php
@@ -132,6 +132,11 @@
     private function includeClass(string $className, string $fileItemPath): bool
     {
         if (!class_exists($className)) {
+            // phpcs:ignore Magento2.Security.Superglobal
+            if (PHP_SAPI !== 'cli' || isset($_SERVER['REQUEST_METHOD'])) {
+                throw new \RuntimeException('Class files can only be scanned from a command-line process.');
+            }
+
             // phpcs:ignore
             require_once $fileItemPath;
             return true;
diff --git a/setup/src/Magento/Setup/Module/Di/Code/Scanner/ArrayScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Scanner/ArrayScanner.php
--- a/setup/src/Magento/Setup/Module/Di/Code/Scanner/ArrayScanner.php
+++ b/setup/src/Magento/Setup/Module/Di/Code/Scanner/ArrayScanner.php
@@ -15,6 +15,11 @@
      */
     public function collectEntities(array $files)
     {
+        // phpcs:ignore Magento2.Security.Superglobal
+        if (PHP_SAPI !== 'cli' || isset($_SERVER['REQUEST_METHOD'])) {
+            throw new \RuntimeException('DI array files can only be scanned from a command-line process.');
+        }
+
         $output = [];
         foreach ($files as $file) {
             if (file_exists($file)) {
diff --git a/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlInterceptorScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlInterceptorScanner.php
--- a/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlInterceptorScanner.php
+++ b/setup/src/Magento/Setup/Module/Di/Code/Scanner/XmlInterceptorScanner.php
@@ -99,6 +99,13 @@
             $className = preg_replace('/^([0-9A-Za-z]*)_([0-9A-Za-z]*)/', '\\1_\\2_controllers', $className);
             $filePath = stream_resolve_include_path(str_replace('_', '/', $className) . '.php');
             if (file_exists($filePath)) {
+                // phpcs:ignore Magento2.Security.Superglobal
+                if (PHP_SAPI !== 'cli' || isset($_SERVER['REQUEST_METHOD'])) {
+                    throw new \RuntimeException(
+                        'Controller class files can only be scanned from a command-line process.'
+                    );
+                }
+
                 require_once $filePath;
             }
         }
diff --git a/vendor/magento/framework/Code/Generator/Io.php b/vendor/magento/framework/Code/Generator/Io.php
--- a/vendor/magento/framework/Code/Generator/Io.php
+++ b/vendor/magento/framework/Code/Generator/Io.php
@@ -157,7 +157,23 @@
      */
     public function includeFile($fileName)
     {
-        return include $fileName;
+        $generationDirectory = $this->filesystemDriver->getRealPath($this->_generationDirectory);
+        $realFileName = $this->filesystemDriver->getRealPath($fileName);
+        $generationDirectory = $generationDirectory
+            ? rtrim(str_replace('\\', '/', $generationDirectory), '/') . '/'
+            : false;
+        $realFileName = $realFileName ? str_replace('\\', '/', $realFileName) : false;
+
+        if (!$generationDirectory || !$realFileName || strpos($realFileName, $generationDirectory) !== 0) {
+            throw new FileSystemException(
+                new \Magento\Framework\Phrase(
+                    'The generated code file "%1" is outside the generation directory.',
+                    [$fileName]
+                )
+            );
+        }
+
+        return include $realFileName;
     }

     /**
diff --git a/vendor/magento/framework/Logger/Handler/Base.php b/vendor/magento/framework/Logger/Handler/Base.php
--- a/vendor/magento/framework/Logger/Handler/Base.php
+++ b/vendor/magento/framework/Logger/Handler/Base.php
@@ -95,6 +95,17 @@
             $this->filesystem->createDirectory($logDir);
         }

+        // Temporary StyleSmuggler containment: neutralise PHP open tags on the
+        // fully formatted line, so a poisoned log file is inert whichever include
+        // gadget reaches it. Revert once Adobe ships a supported fix.
+        if (isset($record['formatted']) && is_string($record['formatted'])) {
+            $record['formatted'] = str_replace(
+                ['<?', '<%'],
+                ['&lt;?', '&lt;%'],
+                $record['formatted']
+            );
+        }
+
         parent::write($record);
     }

diff --git a/vendor/magento/framework/Webapi/ErrorProcessor.php b/vendor/magento/framework/Webapi/ErrorProcessor.php
--- a/vendor/magento/framework/Webapi/ErrorProcessor.php
+++ b/vendor/magento/framework/Webapi/ErrorProcessor.php
@@ -17,6 +17,7 @@
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Framework\Phrase;
 use Magento\Framework\Serialize\Serializer\Json;
+use Magento\Framework\Serialize\Serializer\JsonHexTag;
 use Magento\Framework\Webapi\Exception as WebapiException;

 /**
@@ -96,7 +97,7 @@
         $this->_logger = $logger;
         $this->_filesystem = $filesystem;
         $this->directoryWrite = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
-        $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
+        $this->serializer = $serializer ?: ObjectManager::getInstance()->get(JsonHexTag::class);
         $this->registerShutdownFunction();
     }

diff --git a/vendor/magento/module-sales/Model/Service/PaymentFailuresService.php b/vendor/magento/module-sales/Model/Service/PaymentFailuresService.php
--- a/vendor/magento/module-sales/Model/Service/PaymentFailuresService.php
+++ b/vendor/magento/module-sales/Model/Service/PaymentFailuresService.php
@@ -98,6 +98,12 @@
         string $message,
         string $checkoutType = 'onepage'
     ): PaymentFailuresInterface {
+        // Temporary StyleSmuggler containment.
+        $this->logger->warning('Payment failure email suppressed by temporary StyleSmuggler containment.');
+
+        return $this;
+
+        // phpcs:disable
         $this->inlineTranslation->suspend();
         $quote = $this->cartRepository->get($cartId);

Eight changes.

  • Report serializers use JsonHexTag, preventing new var/report and var/report/api files from containing raw PHP tags. The Web API change adapts Graycore’s mitigation.
  • Io::includeFile() rejects files outside the generated-code directory.
  • DI scanners refuse to include PHP during web requests. CLI deployment commands remain available.
  • PaymentFailuresService::handle() returns before rendering. Failed-payment emails remain disabled while the patch is installed.
  • Logger\Handler\Base::write() escapes PHP open tags on the formatted line, so a poisoned var/log file is inert whichever include gadget reaches it.

If your release process allows it, exclude the complete setup/ tree from web-runtime images.

No constructor signatures change, so the DI metadata in generated/ stays valid: the patch goes out with a patch command and an opcache clear. No recompile, no static content deploy, no maintenance window. The factory fixes call ObjectManager::getInstance() inline instead: a service locator, which is the right trade for a hot patch and the wrong one for an upstream PR.

# save the revision you deploy as stylesmuggler-containment.patch
patch -p1 --forward --dry-run < stylesmuggler-containment.patch
patch -p1 --forward < stylesmuggler-containment.patch
systemctl reload php8.5-fpm          # or: cachetool opcache:reset

--forward matters: without it, running the apply command twice on an already-patched tree makes patch silently answer its own “Reversed (or previously applied) patch detected! Assume -R?” prompt and remove the patch.

Rollback, same:

patch -p1 -R < stylesmuggler-containment.patch
systemctl reload php8.5-fpm

Verified in production mode with generated/ byte-identical across apply, revert and re-apply.

5. Deal with reports and logs created before the patch

The serializer changes only protect new files. Search what’s already there before returning a node to service:

grep -Ral --fixed-strings '<?' var/report/ var/log/
grep -Ral -e 'X_TRACE_' -e 'X-TRACE-' var/report/ var/log/

Preserve suspicious files with timestamps and hashes, then move them outside the web runtime. Rewriting them destroys evidence and does not make the host trustworthy.

Deploy and verify

Revert revision 2 before applying VULN-39341, then apply the October patch. Compile DI because Adobe adds a constructor argument to BlockFactory, then clear OpCache and return nodes one at a time.

Verify that:

  • if you blocked it, GraphQL is unreachable through every public hostname, and the origin is blocked or authenticated too
  • new var/report and var/report/api files start with <?php exit; ?>, and nested values contain no executable PHP opening tag
  • admin grids that use rowUrl generators still list rows (Attribute Sets, Email Templates, Newsletter Queue, Integrations, Catalog Price Rules)
  • a {{for}} loop in a custom email template still renders
  • the reproduced stage-two request cannot execute a file from var/log, var/report, pub/media, /tmp or app/code
  • transactional email rendering still works, including failed-payment mail, and {{block}} directives in CMS blocks, CMS pages and email templates still render
  • grep -c resolveDeferredDirectives vendor/magento/framework/Filter/Template.php is not 0 on any node
  • no suspicious process, persistence file or report marker exists on any fleet node

Patched stores still send “Payment Transaction Failed” emails: an unauthenticated request to the PayPal GraphQL resolver fires one with no payment behind it. A burst after patching is not proof of compromise on its own. Tu Van’s plugin stops them.

If the interim patch is still installed, remove it before applying Adobe’s patch:

patch -p1 -R < stylesmuggler-containment.patch
systemctl reload php8.5-fpm

If a node is compromised

Do not spend the recovery window trying to disinfect it. Once code has run as the Magento filesystem user, assume it read app/etc/env.php, database and Redis credentials, the encryption key, payment/API credentials and any deployment secrets available to PHP-FPM.

My minimum recovery plan is:

  1. Preserve memory, disk and central logs.
  2. Build replacement nodes from a known-good source revision and base image.
  3. Apply the mitigations above before accepting traffic.
  4. Rotate every secret readable by the compromised Unix account.
  5. Invalidate admin and customer sessions.
  6. Audit admin users, integrations, OAuth tokens, CMS content, email templates, database triggers, cron, queues and SSH keys.
  7. Hunt across every node, environment and shared home directory.

Run eComscan against the entire account rather than only the active release, because the implant lives above the Magento document root:

~/bin/ecomscan \
  --skip-dashboard \
  --format=json \
  --min-confidence=0 \
  --deep \
  /path/to/account/root

Capture volatile evidence first. Sansec note that eComscan 1.9.7 may terminate the malicious process for Shield customers.

The scope argument matters more than it looks. Disrex had a store return a clean eComscan result while its cron persistence was actively re-adding itself, because the scan was pointed at the document root and the implant lives in the user’s home directory. Point it at the account root or the result means very little.

Current IOCs

ℹ️IOCs last reviewed 02/11/2026

A snapshot of Sansec’s advisory as they last updated it, on 14th September 2026. Operators rotate infrastructure, so re-check it before every hunt. Sansec publish no IOCs for BlockStrap, as no attacks have been seen.

Almost all of this is from Sansec’s StyleSmuggler research. They did the work; it’s repeated here so it sits alongside the response steps:

https://www.incofar.it/js/jquery/plugins/ajaxfileupload/mag.txt   # malware download
247.cdnflare.xyz            # malware download
209.141.43.95               # malware download, http://209.141.43.95/files/ (FranTech AS53667)
99.84.67.186:443            # C2, WebSocket over TLS
windwsecurity.run:443       # TCP, remote shell
ntp.timesysnc.net:123       # UDP, NTP-shaped C2 traffic
time.microsft.run:123       # UDP, NTP-shaped C2 traffic
pool.microsft.studio:123    # UDP, NTP-shaped C2 traffic
ntp.timesync.to:123         # UDP, NTP-shaped C2 traffic, fc-cache build
ntp.synctime.to:123         # UDP, fallback
ntp.syncstime.to:123        # UDP, fallback
api4.ipify.org              # plain-HTTP public IP lookup before beaconing
ipv4.icanhazip.com          # plain-HTTP public IP lookup before beaconing
ipv4.ident.me               # plain-HTTP public IP lookup before beaconing
ipinfo.io                   # plain-HTTP public IP lookup before beaconing
88.216.72.181               # attacker source, seen at multiple victims
182.182.152.48              # attacker source
209.73.130.148              # attacker source, successful exploit
76.31.99.207                # attacker source, failed exploit
77.239.124.107              # attacker source, follow-up requests
88.216.72.182               # attacker source
98.224.189.28               # attacker source
checkout-cdn.com            # exfiltration
5.181.86.133                # historic — no longer listed by Sansec, unconfirmed
185.157.160.251:123         # C2, A record for ntp.timesync.to and ntp.timesysnc.net (07/09)

sha256 e315687a1dfe61ef4a5a5642214db6d3b2b05d81391285eebc2af664641a26a7
sha256 4352cabaa451e5a894535fbcc4d46628701303322a13745cb5479d7d0534ae8e   # kworker-linux-x64, new build
sha256 d2fbf9eb75c495bfea48790d3b228fab0c15a282419c3d3f5e49294c4e1a3e82   # kworker-linux-arm64, new build
sha256 1a3374ffac5b0a62467612f264c49792d206304d4514409c982325c91231375d   # chronyd build, from /proc/<pid>/exe

/tmp/.kw_<random><random>
/tmp/.cache_<random><random>       # drop-path variant
/tmp/.fc-<8hex>/fc-cache
/tmp/fc-cache                      # drop-path variant
/tmp/.fc_<8hex>.lock               # holds the implant PID
~/.local/share/.gvfsd/gvfsd-user
~/.local/share/.gvfsd/.gvfsd_<8hex>.lock
~/.cache/fontconfig/fc-cache
process [kworker/u:8:0]
process fc-cache
process chronyd                    # 07/09 build; parent PID 1 where it has no cron
/tmp/.chrony-<8hex>/chronyd
implant version 2.1.5              # beacon field; 2.1.4 in the 06/09 build
crontab */5 * * * * exec <home>/.local/share/.gvfsd/gvfsd-user
crontab 13,43 * * * * <home>/.cache/fontconfig/fc-cache >/dev/null 2>&1
crontab 57,27 * * * * /tmp/.chrony-<8hex>/chronyd >/dev/null 2>&1   # often written straight to the spool

User-Agent: python-requests 2.15.0         # implant operator's exploit requests
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
                                           # implant only, for its plain-HTTP IP lookups

Disrex recovered two more, one from disk and one from the running process on the same host:

sha256 8334b434fa3fe9f59cebe9609b11e0b1fd19d10212c45c705adec1902a1d06ef   # on disk
sha256 251fabd50d7b18a8b5e1b3ef5d64e7198c17244778f6461fb1ab07f6169bf220   # in memory

The sample recovered during my own investigation had a different SHA-256 again, which Sansec have since adopted into their published list:

sha256 b79dfdc1eed860e0b76c629d6adfce251db379b0b45a6d728d4ef483f7551420

Four hashes for one implant, two of them from the same machine. Hash matching is a bonus here, not a detection strategy.

Hunt UDP/123, not just HTTPS. Six of the C2 endpoints speak NTP-shaped traffic on the standard NTP port. Egress rules that only inspect 443 won’t see them, and nor will a hunt that greps web logs. If your nodes don’t need arbitrary time servers, pin them to your own NTP source and alert on everything else.

A second, unrelated attacker has turned up at the same victims, sharing nothing with the implant operator except the way in. Same poisoning vector, recovered from a Store: header, dropping a small PHP web shell that runs whatever arrives in a task POST parameter. Sansec read it as off-the-shelf tooling, someone verifying access rather than operating a fleet. One host can carry two unrelated intrusions through one flaw:

sha256 d61217ca0bca83204302fa7b41935ce36f73764559c156d5c980f2fedddffb6e   # 485-byte dropper
pub/media/catalog/product/cache/ss_<10hex>/sync_<10hex>.php               # web shell
X-Cache-Token: fced27f6d57702565353ecc11722533b                           # required; 404 without it
457cfa2fb7p5.daf892t5qau4og8pi4cghbc6fhm1dim3u.oast.site                  # exec callback
ss5_457cfa2fb7                                                            # marker echoed outside the PHP tags

find -L pub/media -type f -name '*.php' is the whole check, already in the block above. There should be none there, and -L matters because pub/media is often a symlink to shared storage.

The store compromised on 9th September adds a second toolkit, a framework backdoor and a skimmer, plus the sources Sansec logged for each stage of the exploit:

# gs-netcat (Global Socket Toolkit)
sha256 d94f75a70b5cabaf786ac57177ed841732e62bdcc9a29e06e5b41d9be567bcfa
212.132.98.170:443                 # Global Socket relay
152.53.173.29:443                  # Global Socket relay
pub/defunct                        # dropped, run, unlinked 26 seconds later
defunct                            # same binary, store root
defunct.dat                        # relay secret
GS_ARGS=-s <secret> -liD           # process environment
process [kstrp]
process [ksmd]                     # also a real kernel thread; suspicious when not root

# WraithC2 RAT
sha256 64bcb4426783e2b4f8ec68b2f63e42cf4b404af6cd65c4c47f5ae3ac0a3d439e
BuildID b183335f5474b15df95c48ca781e75c27e704ac2
213.111.146.27:80,443,8443         # C2, beacon path /a9f3k2-c2
@wraith-8e32b7a8                   # abstract unix socket shared by all three processes
process sshd: apache@notty         # parent PID 1
process -bash                      # parent PID 1
process [kworker/u16:2]            # parent PID 1

# in /tmp/systemd-private-<machine-id>-php-fpm.service-<8char>/tmp/
.dbus-session-48                   # wraith binary
.dbus/dbus-session-48              # wraith binary
.pipewire-session-48               # wraith binary
.pipewire/pipewire-session-48      # wraith binary
.dbus/.c2                          # wraith config
.dbus_<8hex>.lock                  # holds the live PID
.gsusr-48/defunct                  # gs-netcat copy
tmp.log                            # Adminer, fetched by the View.php include
adminer.version

# framework backdoor and skimmer
vendor/magento/framework/App/View.php    # remote include
gl_google_advisor_824808                 # cookie that triggers it, base64 URL
sha256 8cef8dcac2bb4598fb821859deb61c9b6889b4bdad00498a38d113954334bbb3   # Adminer 6.0.2
core_config_data design/head/includes    # base64 skimmer, every store view
safeprocessor.com                  # skimmer POST target
assetsbundle.com                   # skimmer POST target
widgetassets.com                   # skimmer POST target
gtmtimestamp.com                   # skimmer POST target
specterguardian.com                # skimmer POST target

# stage-1 sources
45.10.167.153
45.135.3.216
217.181.79.178
217.181.79.189

# stage-2 sources
45.135.2.183
216.40.73.46
146.19.140.158
45.145.128.160
194.26.129.230
88.218.44.215
83.142.54.144
93.177.119.38
37.72.141.145
144.31.2.154                       # later attempts
217.181.64.0/18                    # ten addresses in this range

# var/log/exception.log
Laminas\Loader\Exception\InvalidArgumentException                # one per stage-2 attempt
Map file provided does not exist                                  # failed include; absent on a day with the others is the bad case
Variable "$guard" of required type "Boolean!" was not provided.   # attacker tooling
Requested store is not found (<?                                  # PHP arriving in the Store header

Alert on plain-HTTP IP lookups. The fc-cache build calls api4.ipify.org, ipv4.icanhazip.com, ipv4.ident.me or ipinfo.io over port 80, with the truncated User-Agent above. A storefront node making that request is worth a page.

The request paths alone are not IOCs. The campaign uses /graphql, /paypal/transparent/response/ and /customer/section/load/, all legitimate routes carrying ordinary traffic all day. They only mean something correlated with payload content, a poisoned report or log, and process activity in the same window.

Don’t rely on hashes or one source IP. Look for the combination: process identity, executable path, persistence, outbound traffic, poisoned reports and the original web requests.

Bonus Tip: How to check the fleet at scale?

By hand is fine for a handful of stores, less so for a fleet. This went into our standard healthcheck playbook, so every node gets checked on the next run and the check sticks around long after the incident.

Run it as the Magento filesystem user, not root: ~ has to expand to the web user’s home for the implant check to look in the right place.

Ansible Playbook

# tasks/healthchecks/security/stylesmuggler.yaml
---
- name: Look for the gvfsd, fc-cache and chronyd implants and persistence files
  tags: stylesmuggler
  register: stylesmuggler_implant
  changed_when: false
  failed_when: false
  ansible.builtin.shell:
    executable: /bin/bash
    cmd: |
      set -eu
      for path in ~/.local/share/.gvfsd ~/.cache/fontconfig/fc-cache \
                  /tmp/.kw_* /tmp/.cache_* /tmp/.gvfsd[-_]* /tmp/.fc[-_]* /tmp/fc-cache \
                  /tmp/.chrony-*/chronyd; do
        if [[ -e "$path" || -L "$path" ]]; then
          printf '%s\n' "$path"
        fi
      done
      if cron_output=$(LC_ALL=C crontab -l 2>&1); then
        printf '%s\n' "$cron_output" | awk 'tolower($0) ~ /gvfsd|fontconfig|fc-cache|chrony/'
      elif [[ "$cron_output" == "no crontab for "* ]]; then
        :
      else
        printf '%s\n' "$cron_output" >&2
        exit 2
      fi
      grep -rlE 'gvfsd|fc-cache|chronyd' /var/spool/cron/ 2>/dev/null || true

- name: Look for implant and WraithC2 process names running as the web user
  tags: stylesmuggler
  register: stylesmuggler_kworker
  changed_when: false
  failed_when: false
  ansible.builtin.shell:
    executable: /bin/bash
    cmd: |
      set -o pipefail
      ps -eo user,pid,ppid,comm,args | awk '$1 != "root" && ($4 ~ /kworker|fc-cache|chronyd|kstrp|ksmd/ || ($3 == 1 && $4 ~ /sshd|bash/))'

- name: Look for poisoned reports and logs
  tags: stylesmuggler
  register: stylesmuggler_reports
  changed_when: false
  failed_when: false
  ansible.builtin.shell:
    executable: /bin/bash
    chdir: "{{ project_root }}"
    cmd: |
      grep -Ral -e '<?' -e 'X_TRACE_' -e 'X-TRACE-' var/report/ var/log/
      grep -Fal 'array_merge()' var/log/system.log
      grep -l gl_google_advisor vendor/magento/framework/App/View.php

- name: Assert StyleSmuggler IOC status
  tags: stylesmuggler
  ansible.builtin.assert:
    that:
      - stylesmuggler_implant.rc == 0
      - stylesmuggler_kworker.rc == 0
      - stylesmuggler_reports.rc in [0, 1]
      - stylesmuggler_implant.stdout | trim == ''
      - stylesmuggler_kworker.stdout | trim == ''
      - stylesmuggler_reports.stdout | trim == ''
    fail_msg: >-
      A check failed or possible StyleSmuggler IOCs were found. Review each task's
      stderr and stdout. For suspected compromise, drain the node and collect evidence
      before killing anything. See https://www.samdjames.uk/docs/platforms/magento/security/stylesmuggler/
    success_msg: "No known indicators found by these checks; this does not establish that the host is clean."

- name: Look for StyleSmuggler and BlockStrap patch markers
  tags: stylesmuggler
  register: stylesmuggler_patch
  changed_when: false
  failed_when: false
  ansible.builtin.shell:
    executable: /bin/bash
    chdir: "{{ project_root }}"
    cmd: |
      set -e
      grep -q JsonHexTag pub/errors/processor.php
      if [[ -f vendor/magento/framework/Webapi/ErrorProcessor.php ]]; then
        grep -q JsonHexTag vendor/magento/framework/Webapi/ErrorProcessor.php
      else
        grep -q JsonHexTag lib/internal/Magento/Framework/Webapi/ErrorProcessor.php
      fi
      grep -q resolveDeferredDirectives vendor/magento/framework/Filter/Template.php

- name: Assert patch marker status
  tags: stylesmuggler
  ansible.builtin.assert:
    that:
      - stylesmuggler_patch.rc == 0
    fail_msg: "StyleSmuggler serializer or BlockStrap markers are missing or unreadable; review the deployed artifact."
    success_msg: "Patch markers found; verify every patch change and runtime behaviour separately."

A few things worth knowing before you run it:

  • The /tmp/.gvfsd[-_]* and /tmp/.fc[-_]* globs and the two marker spellings are deliberate. The lock file uses an underscore where earlier write-ups showed a hyphen, and a later payload variant switched to a hyphenated marker. Matching one spelling misses live infections.
  • The fc-cache and chronyd matches will fire on genuine system processes. Treat them as a triage prompt: check readlink /proc/<pid>/exe before escalating.
  • The array_merge() grep catches the TypeError Magento’s DI array scanner raises when it includes a poisoned file. It is the one check here indicating the exploit reached its sink rather than merely being attempted.
  • The cron check reads /var/spool/cron/ as well as crontab -l, because the implant writes its entry straight into the spool directory. The chronyd build can run with no cron at all, so cron alone is not enough.
  • failed_when: false lets the asserts distinguish no matches from scan failures using both exit status and output. Review stderr on any failed assertion; a failed scan is not a clean result.
  • Run the IOC tasks with --limit in waves if your fleet is large. A hit means you want to be looking at that node before the playbook has moved on to another fifty.
  • The resolveDeferredDirectives marker fails until the October BlockStrap patch is on. On Mage-OS, point it at vendor/mage-os/framework/Filter/Template.php.
  • The View.php grep catches the cookie-triggered remote include from the 9th September compromise. A composer install replaces the file, so check before rebuilding.
  • The serializer marker check is a quick drift check, not proof that the full patch is installed or effective. Validate every change and its runtime behaviour on the final artifact.

What these mitigations do not do

Two stages: attacker-controlled data is written into a Magento-controlled file, then Magento’s template system is made to turn that data into an object-factory instruction which includes it. The controls above break both known include sinks. They are not a correction to the template parser, and BlockStrap (CVE-2026-103849) proved it five weeks later: a second route through the same parser that VULN-39341 does not close.

Stage one is fully interchangeable. I tested six write locations against both include sinks: var/log, var/report, pub/media/*.php, pub/media/*.jpg, /tmp and app/code. Twelve of twelve execute unpatched; twelve of twelve are blocked by revision 2. The sinks take an arbitrary path, so extension and directory are irrelevant and a .jpg polyglot works just as well. Blocking PHP execution under pub/media in nginx buys nothing, because the include is done by PHP, not by a web request. Any file-write bug substitutes for the log poisoning, which is why the serializer and logger hunks aren’t the fix: they cover two of the six locations I could demonstrate.

One residual path stays open. {{block class=X}} with ordinary scalar parameters still makes PHP autoload X, and generated/code and app/code are autoload roots. Anyone who can write a .php file into either gets code execution through the directive, with VULN-39341 or without. I have not re-tested it against the October patch. Stock Magento autoloads the same class on the way to constructing it. Log poisoning can’t reach it (wrong extension, wrong directory) and neither can pub/media, so it needs a separate write primitive. Graycore’s patch (now archived) closes it with a {{block}} class allowlist that permits nothing by default; layer it on if you want that shut too.

On failed-payment emails. Sansec describe execution happening as one is rendered (nobody needs to open it, and delivery failure doesn’t prevent exploitation), so bursts of “Payment Transaction Failed Reminder” messages are worth investigating either way. I couldn’t reproduce it on 2.4.7-p10: with the payload in the failure message and again in the |raw billing address, on an unpatched install where the chain otherwise fires, the directive lands in the email as literal text and never runs. Framework\Filter\Template::filter() does not re-scan substituted variable output. Treat it as a detection signal, not the execution route.

None of it cleans an infected node. WAF rules, Adobe’s patch, threat hunting and trusted rebuilds solve different parts of the incident.

Going forward, how do we improve security posture?

The same takeaways from Session Reaper and PolyShell apply again, and StyleSmuggler adds one more.

1. Sansec Shield

Shield had a virtual patch out ahead of any vendor fix. Third time running, it’s been the control that mattered on day zero. Still not a guarantee: stores were compromised before the rules landed, so pair it with the hunting and hardening below rather than treating it as cover.

2. Turn off what you don’t use

If GraphQL had been off on the stores that don’t use it, the disclosed entry point wouldn’t have existed for them. Same for unused controllers, endpoints and modules: every one you disable is one you don’t have to patch under pressure.

3. Bulk patching infrastructure

A temporary patch is only useful if you can push it across the fleet in minutes and roll it back just as fast when Adobe ships the real one. A few approaches with Ansible and a Magento module in magento2-patching.

4. Read only file system

Read-only application code reduces opportunities for persistence. Restrict the PHP-FPM account’s access to home directories, user cron and temporary directories too. Protecting the application tree does not automatically protect the web user’s home. Nginx restrictions govern incoming HTTP requests; they do nothing about an already-running PHP process including readable files, starting processes or establishing persistence.

Two smaller controls in the same spirit, both worth doing today regardless of this vulnerability. Add proc_open to PHP’s disable_functions, which removes the mechanism the dropper used to spawn its process. Mount /tmp, /var/tmp and /dev/shm with noexec, which stops a payload staged there from executing at all. Test both in staging: some deployment tooling and a handful of extensions do legitimately shell out. If your release process allows it, exclude the complete setup/ tree from web-runtime images.

5. Hunt above the document root

The implant lives in ~/.local/share, not pub/. Scans scoped to the active release miss it entirely. Scan the whole account.

Conclusion

  • Apply Adobe’s VULN-39341 patch, then the October APSB26-153 patch for BlockStrap, and block GraphQL outright if nothing you own needs it
  • Keep Sansec Shield current while the fleet rollout completes
  • Hunt all three implant names on every node (non-root kworker with gvfsd-user, fc-cache and chronyd), plus gs-netcat, WraithC2, the View.php include and the design/head/includes skimmer
  • Collect volatile evidence before killing anything
  • Rebuild nodes with confirmed compromise and rotate every secret PHP-FPM could read; investigate report markers before concluding that execution occurred
  • Revert temporary containment before applying VULN-39341; the patches overlap and cannot be stacked
  • Treat the remaining class-autoload path as a hardening gap, especially anywhere PHP-FPM can write to app/code or generated/code

Recheck Sansec’s StyleSmuggler and BlockStrap advisories as indicators change.

References