这个独立的实验环境在固定修订版本的 Magento Open Source 2.4.9 检出上复现了完整的未认证 StyleSmuggler HTTP 攻击链。随后它应用 Adobe 的 VULN-39341 补丁,并证明完全相同的请求序列不再能够到达 PHP 执行阶段。
该证明刻意仅使用标记。被投毒的报表会求值一个固定的 hash('sha256', fresh_nonce) 表达式。预期摘要从不会发送给 Magento,因此如果在 Stage 2 响应中看到它,就能独立证明 PHP 已解析并执行了该报表。该 PoC 不包含命令执行器、下载器、回调、代理或由操作者提供的 PHP。
该实验环境提供:
755e34dd689021c5165db9d35ecff74f7dc51527 的原版 Magento 2.4.9 Docker 栈;这是针对固定构建的实验辅助证明。它不是扫描器结果,也不是基于报表 ID、HTTP 状态、邮件发送失败或文件上传的假设。新的响应标记就是执行判定依据。
仅使用这个一次性实验环境。该 HTTP PoC 会拒绝所有非回环目标,并且不接受任意载荷或报表路径。不要将这些探测程序放在生产 Web 根目录下。对于现有安装,请使用只读验证器或一次性暂存克隆。
要求:
默认仅发布 nginx,且仅发布在 127.0.0.1:8096 上。MariaDB、Redis、OpenSearch、PHP-FPM 以及辅助报表网关均不暴露到宿主机网络。公共网关选择生产风格的 Magento 错误处理,因此 Stage 1 会创建一条正常的 var/report 记录。
cd docker-lab
cp .env.example .env
docker compose up -d --build
docker compose logs -f php
Magento 的初始克隆、依赖安装和应用安装通常需要 15–40 分钟。当 PHP 日志输出 Ready 时,运行:
make ab
A/B 命令始终会尝试保持源文件处于已修补状态,并删除其 HTTP 运行期间披露的精确报告产物。
仅当全部三个证明层与其对照项匹配时,测试才会通过:
Unpatched report: raw-tag=true, guard=false
Patched report: raw-tag=false, guard=true, neutralized=true
Unpatched component: marker=true
Patched component: marker=false
Full HTTP, vulnerable: execution_observed=true, expectation_met=true
Full HTTP, patched: execution_observed=false, expectation_met=true
[PASS] Report storage, component execution, and full HTTP execution match all A/B controls.
poc/http_rce_probe.py 仅向回环 Magento 网关发送未认证请求:
poison a normal Magento failure report
-> createEmptyCart
-> setGuestEmailOnCart
-> setBillingAddressOnCart with the recursive formatter construction
-> handlePayflowProResponse with a declined response
-> billing-address formatter signs an unresolved Preview block
-> failed-payment email filter constructs Email Template Preview
-> Preview reads request query parameters type/text/styles
-> ColumnSet -> UrlGeneratorFactory -> Aws S3Client
-> with_resolved callback -> ArrayScanner::collectEntities()
-> include the poisoned report
-> fresh SHA-256 response marker
重要的连接点是账单地址。一个自引用邮编、库存 HTML 地址格式以及嵌套模板指令,会导致 Magento 的基础格式化器将未解析的 Preview 块包裹在 Magento 自身的延迟指令签名中。后续的支付失败邮件过滤器共享该签名提供者并接受该块。随后 Preview 由 Layout 在 GraphQL 请求内直接构造;不会派发任何管理路由。
make http-vulnerable # requires execution_observed=true
make http-patched # requires execution_observed=false
make component-ab # decomposed report/component controls only
HTTP 封装层会选择所请求的源状态,运行仅限回环的探测,并删除 Magento 返回的精确报告 ID。要在一次性实验环境中直接检查原始探测:
make vulnerable
python3 poc/http_rce_probe.py \
--target http://127.0.0.1:8096 \
--expect vulnerable
make patched
python3 poc/http_rce_probe.py \
--target http://127.0.0.1:8096 \
--expect patched
直接调用会保留生成的报告以供检查;make http-* 包装器会执行清理。
直接组件探测仍然可用,因为它可以独立于递归地址格式化连接器,定位下游 gadget 中的故障。
此检查从不启动 Magento,也不执行挂载目录树中的代码。容器没有网络、没有 Linux 能力、根文件系统为只读,目标挂载也为只读。
make validate TARGET=/absolute/path/to/magento
预期完全修补后的判定:
Summary: 9/9 controls present
Verdict: FULL_CONTROL_SET_PRESENT
任何不满足此条件的情况都会被报告为 FULL_CONTROL_SET_NOT_CONFIRMED,而不会被自动视为可利用。请确认确切的 Commerce 版本/版本号,并通过其支持的部署流程应用 Adobe 的版本匹配补丁。
使用官方公告以及与所部署版本匹配的补丁:
此处嵌入的补丁仅针对公开的 2.4.9 monorepo 实验环境进行了路径映射。请勿将其直接应用于生产环境的 Composer 安装。打补丁也无法移除已存在的植入物或恢复已泄露的凭据。
缺失的 HTTP 连接器由 Fortbridge 于 2026 年 9 月 12 日发布并独立演示:
本实验使用独立实现的、仅限回环的标记探测,并保留其自身固定的 Magento 与 Adobe 补丁 A/B 对照。
有关数据流、补丁对照和回顾,请参阅技术说明。确切的本地测试结果记录在 VALIDATION.md 中。
make down # preserve volumes
make reset # delete this lab's source, database, and OpenSearch volumes