
CVE-2026-103849 (BlockStrap) reproduction lab: unauthenticated {{block}} injection on Magento 2.4.9 via guest GraphQL, A/B vs APSB26-153; command execution only through a labeled synthetic gadget, not stock classes.
[!IMPORTANT] This repository proves the stock BlockStrap directive-injection primitive, an unauthenticated HTTP carrier, and a bounded stock file side effect. The command-execution track requires the clearly labeled synthetic lab gadget; it does not claim a stock Magento full-RCE chain.
This lab reproduces the core second-pass {{block}} directive-injection
primitive fixed by Adobe in APSB26-153, including a stock unauthenticated HTTP
carrier. It uses Magento Open Source 2.4.9 at commit
755e34dd689021c5165db9d35ecff74f7dc51527 and keeps the September VULN-39341
StyleSmuggler hotfix installed in both test states.
The current claim-by-claim audit is in REANALYSIS.md.
Run the lab only on a system you control. The exposed HTTP and MailHog ports
bind to 127.0.0.1; database, Redis, OpenSearch, PHP-FPM, and SMTP remain on
the private Compose network. The command demonstration accepts only a random
nonce and executes the literal command id 2>&1; it cannot accept shell text,
an output path, or file content from the operator.
The validated environment used Docker Engine with Compose v2 on amd64.
Every base and service image is pinned to an immutable registry digest; the
MailHog image is specifically pinned to its linux/amd64 manifest.
Host-side checks and wrappers require Bash, GNU Make, Python 3.10 or newer,
PHP CLI, and standard Unix utilities including awk, comm, find, and
either sha256sum or shasum. PHP CLI is used only by make verify; Magento
itself runs in Docker. Allow at least 8 GB of memory, 10–15 GB of free disk,
and internet access during the initial image and Magento build. Other
architectures may work but are not covered by the recorded evidence.
On Linux, OpenSearch requires vm.max_map_count of at least 262144. For
example, set it for the current boot with
sudo sysctl -w vm.max_map_count=262144. If 10.210.103.0/24 overlaps a local
network, change the subnet under networks.default.ipam in compose.yaml
before startup.
The credentials in .env.example are isolated lab defaults. Do not reuse them
for any other system.
The stock primitive probe is deliberately non-destructive. It asks Magento's stock
Magento\\Framework\\View\\Element\\Text block to run getCacheKey() over a
fresh nonce. The exact success value, CUSTOM_BLOCK_<nonce>, never appears in
the input. That probe does not execute a command, write a file, make a callback,
or accept an operator-supplied payload. Separate opt-in probes cover a bounded
stock file side effect and a lab-only conditional command-execution case.
The lab has four evidence tracks: a component A/B, a stock unauthenticated HTTP A/B, a bounded stock file-side-effect A/B, and a conditional command-execution A/B using the explicitly installed lab gadget described below.
The A/B test proves the BlockStrap template-engine primitive:
root email filter sees {{template ...}}
-> callback renders attacker-shaped data through a child framework filter
-> child cannot process {{block ...}} and returns it unchanged
-> vulnerable engine wraps that attacker-controlled directive in its signature
-> root engine generically rescans the signed text
-> root email filter invokes blockDirective()
-> stock Text block transforms a fresh nonce with its CUSTOM_BLOCK_ prefix
With the October fix, the child output is not generically signed or rescanned.
Only directives explicitly placed in the new DeferredDirectiveRegistry can
be resolved by the root, so the identical {{block}} remains inert.
This proof uses the real Magento object manager, directive processors, shared filtering-depth meter, signature provider, layout, and block factory.
The HTTP probe uses only public guest GraphQL operations and a local SMTP sink:
createEmptyCart
-> setGuestEmailOnCart
-> setBillingAddressOnCart with the recursive address-format carrier
-> handlePayflowProResponse with a declined response
-> recursive address formatting reaches a nested base-filter pass
-> its signed output is stored as billingAddressHtml
-> a later email-filter pass shares the request signature and rescans it
-> vulnerable only: stock Text::getCacheKey() returns CUSTOM_BLOCK_<nonce>
-> MailHog captures the transformed value
Both states must capture exactly one failed-payment email correlated by the
fresh nonce. The fresh success value is
absent from every HTTP request and appears only when blockDirective() invokes
the stock block. In the patched state an equivalently generated email arrives without that
value. This proves a working unauthenticated request-to-block-execution path.
This stock HTTP probe does not establish operating-system command execution. It contains no command, PHP expression, file-write gadget, callback, or operator payload. It is not presented as one of Sansec's four withheld HTTP-to-RCE chains. No executable public full-RCE PoC was identified in the bounded search performed on 2026-10-18. The search record is retained in evidence/2026-10-18-public-poc-search.md.
poc/http_rce_probe.py plus the BlockStrapLab_Gadget module (gadget/)
demonstrates what happens when a deployment contains a compatible block
gadget. The module is authored for this lab and deliberately executes the
fixed harmless command id; it is not a Magento stock class or a recovered
Sansec chain. Every preceding link stays stock: guest GraphQL carrier,
nested-filter signature wrapping, root blockDirective() dispatch, and
zero-argument output= method selection.
No compatible command-execution gadget was found in the reviewed subset of this exact Magento Open Source 2.4.9 tree. That negative search is incomplete: the dynamic sweep excluded some namespaces and constructor shapes, exercised only selected methods, and retained no packaged raw run. It does not prove absence across Magento Open Source, Adobe Commerce, extensions, versions, or deployment configurations. Stock full RCE therefore remains unproven here.
unauthenticated guest GraphQL flow
-> recursive billing-address carrier stored via setBillingAddressOnCart
-> handlePayflowProResponse decline -> PaymentFailuresService email
-> nested base-filter pass leaves {{block}} unchanged and signs it
-> later email filter rescans and dispatches blockDirective()
-> lab gadget runs fixed `id` as www-data
-> nonce-correlated, base64-wrapped uid output in MailHog + marker file
Run:
make http-rce-ab
make http-rce-ab runs a self-contained A/B wrapper that establishes its
cleanup trap before installing the gadget, then removes it at exit. The patched
state must still capture the correlated failed-payment
email while showing neither the gadget marker nor a marker file. Recorded run:
VALIDATION.md and
evidence/2026-10-18-rce-ab.txt.