Exploit databaseDownload repository ZIP
GH-f9d6f7fa7eb82d295eb1f48536620c8a
dinosn/cve-2026-71362-magento-lab
Sources for CVE-2026-71362
2 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files2
dinosn/cve-2026-71362-magento-labRevision 1dc7f3fcfc38
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
scripts/unpatch.sh
Shell · 1,036 bytes#!/usr/bin/env bash
# Restore the VULNERABLE Magento\Customer\Controller\Account\Edit.php (the pristine 2.4.x
# blob) so the lab is exploitable again. This is the "A" side of the A/B/A negative control.
# Run on the HOST: bash scripts/unpatch.sh
set -euo pipefail
TARGET=app/code/Magento/Customer/Controller/Account/Edit.php
restore() {
cd /var/www/html
cp /lab-patch/Edit.vulnerable.php "$TARGET"
rm -rf generated/code generated/metadata var/cache/* var/page_cache/* 2>/dev/null || true
chown -R www-data:www-data generated var 2>/dev/null || true
chmod -R 2775 generated var 2>/dev/null || true
su -s /bin/bash www-data -c "cd /var/www/html && php -d memory_limit=-1 bin/magento cache:flush" >/dev/null 2>&1 || true
echo "[unpatch] vulnerable $TARGET restored (cache flushed). The PoC should EXPLOIT again."
}
if [ -f /.dockerenv ]; then
restore
else
DC="docker compose"; command -v docker-compose >/dev/null 2>&1 && DC="docker-compose"
cd "$(dirname "$0")/.."
$DC exec -T php bash /lab-scripts/unpatch.sh
fi