Support Case Study
Magento Post-Breach: GraphQL, 463 Shells & Rotation
A Magento Open Source 2.4.7-p10 storefront on Ubuntu server hosting from Database Mart—a USA hosting provider for production e-commerce—suffered a layered compromise: August–September web shells under pub/media/, a 11 November GraphQL template-injection entry that deployed a cryptominer, a database-stored checkout loader, and—days later—card testing driven by a stolen Stripe secret key with MariaDB still listening on 0.0.0.0:3306. With no in-house developers, the merchant asked our hosting support team to contain, patch, harden, and execute an agreed maintenance-window credential rotation on USA hosting infrastructure. This case follows the ticket from first miner alert through quarantine of 463 payloads, APSB26-146 remediation, and a Bruce-led rotation window where five of six steps closed in production.
01 · Resolution
How Support Resolved It
November 7–9, 2026 · Parallel application work
Checkout Module Reinstall While Risk Was Still Rising
The same week, engineers assisted with a unrelated deployment: the merchant’s custom Xcell_PaymentMethods package had been extracted one directory too deep, so checkout JavaScript 404’d. Support reinstalled from the customer’s corrected archive with maintenance mode, setup:upgrade, single-job static deploy (--jobs=1), and ownership fixes—preserving rollback tarballs.
Separately, Bruce correlated miner processes in the PHP-FPM cgroup with a hidden directory under the site user (.syslog-616cdb81). That thread converged with the broader security ticket rather than a simple module fix.
November 11–12, 2026 · Containment & forensics
Cryptominer, GraphQL Exploit & Older Web Root Backdoor
On 11 November the store became unusable—load average exceeded 90, MariaDB hit “too many connections,” and a fake rsyslogd miner (~200% CPU) ran under the application user. Robert’s timeline tied the outbreak to GraphQL template injection from 93.152.214.168 at 06:51 UTC, wget of a payload, hidden directories under /tmp, /dev/shm, and truncated .bash_history.
Forensics also found a 56 GB directory inside the document root containing nine PHP shells dating from August–September—evidence the site was compromised before November. Support quarantined malware paths, moved the backup tree out of the web root, cut PHP-FPM pm.max_children from 250 to 50, and preserved logs before changes.
POST /graphql?type=2&text={{block class=Magento\Backend\Block\Widget\Grid\ColumnSet ...}}
&styles[generatorClass]=Aws\S3\S3Client
Engineer Queta delivered the interim report on 12 November:
- Admin account
adminx — 16 logins since May 2026; no proof of use on 11 Nov.
- APSB26-146 / CVE-2026-75650 — forward simulation passed but reverse failed; official hotfix applied after backup.
- Database injection — malicious JavaScript in
core_config_data id 655 (shipping/shipping_policy/shipping_policy_content); forensic JSON export preserved, not silently deleted.
November 15–16, 2026 · Stripe, shells & hardening
463 Quarantined Files, Stolen Stripe Key, MariaDB Exposure
The merchant proved card-testing on 14–15 November used their Stripe secret directly (USD 1.00 PaymentIntents, origin IP never in access logs). Robert quarantined 463 malicious files from pub/media/custom_options/quote/ and pub/media/customer_address/—four distinct payload families (uploader GIF89a shells, remote loader to a blocked pages.dev host)—into security-evidence/webshells-20261116/ with MD5 manifests.
On 16 November Robert closed the highest-risk gaps the merchant prioritized:
- MariaDB bound to
127.0.0.1; UFW denies 3306/tcp externally.
- nginx returns 403 for executable extensions under
/media/ and /static/.
- Loader domain blocked in
/etc/hosts.
- Built-in Full Page Cache with Redis (second request ~0.14s verified).
- Removed 56 GB obsolete backup; logrotate for multi-GB Magento logs.
- Deleted
seo_api_test integration and disabled its admin user.
Core compare to clean 2.4.7-p10 showed only two intentional deltas: a PHP 8 compatibility shim (app/etc/compatibility.php) and hardened pub/errors/processor.php—both documented for the customer’s nine-point follow-up email.
November 17, 2026 · Maintenance window
Credential Rotation Without Email Passwords
Hamza confirmed window 19:00–20:00 UTC (23:00–00:00 UAE) and refused to email database credentials—support used CloudPanel CLI on the host instead:
sudo clpctl db:show:master-credentials
Engineer Bruce executed the rotation checklist and reported status per step:
| Step | Result |
| Full database backup | Completed → /root/backup |
env.php backup | Completed → /root/backup |
| MariaDB password for application user | Completed; env.php updated |
Magento encryption key (encryption:key:change) | Deferred to merchant (application owner) |
| Cache flush | Completed |
Old env.php off webroot, restricted permissions | Completed |
DB + env.php rotated Evidence preserved Enc. key → customer
“For security reasons, we would prefer not to send database credentials by email. Since you have root access to the server, the MariaDB master credentials can be retrieved directly on the server with CloudPanel’s CLI.”
Hamza Mahmood · Xcell Computers LLC · 17 Nov 2026
Open at ticket close
Items Left for the Merchant & Next Reports
Support continued to track: full written incident report (timeline, entry points, recommendations), deep review of compatibility.php and PolyShellProtection provenance, Adobe patch completeness vs. upload vector, and merchant re-entry of Stripe (IP-restricted), SMTP, and reCAPTCHA after encryption-key rotation. Magento key change stayed with the owner because re-encryption affects stored secrets—support documented impact before execution.
02 · What We Delivered
Support Capabilities Shown
Database Mart acts as a full-stack hosting provider: not only VMs and panels, but incident-grade response on the applications customers run on server hosting. This Magento breach on a USA hosting provider stack is representative of that depth.
- Ticket-scale forensics — GraphQL payload reconstruction, access-log correlation, Stripe dashboard evidence vs. origin logs.
- Evidence discipline — Quarantine without destruction; MD5 manifests; config-row JSON exports; webshell URLs forced to 404.
- Patch verification — Forward/reverse compare against Adobe VULN-39341 hotfix, not “patch installed” checkbox only.
- Capacity & survivability — PHP-FPM pool limits, logrotate, disk recovery after 92% usage.
- Defense in depth — localhost DB bind, nginx execution block under media, FPC/Redis performance restore.
- Scoped maintenance — Step-by-step rotation report; secrets via on-server CLI when email is refused.
03 · Guide
Geek Tips — Magento On Managed Hosting
T1Never Serve .phar / .php8 Under pub/media
On shared or dedicated hosting, Magento media is world-readable. Non-.php extensions bypassed PHP handlers but stayed downloadable—rename or handler broadening turns them into RCE. Block executable MIME classes at nginx for /media/ and /static/.
T2Treat GraphQL POST As A Privileged Surface
Template-injection style GraphQL abuse can land code without a classic admin login. Rate-limit POST /graphql, challenge bots, and keep APSB hotfixes verified with reverse patch simulation—not only version banners.
T3Assume env.php And DB Secrets Are Gone
After any webshell or SQL exposure, rotate DB user password, restrict MariaDB to loopback, and plan encryption:key:change with a credential re-entry checklist (payment gateways, SMTP, captcha).
T4Stripe Abuse Without Origin Logs
Stolen secret keys enable API-side card testing that never hits your storefront. Monitor Stripe request logs and restrict keys by server egress IP when the host provides a stable outbound address.
“When shells, miners, and payment fraud stack up—contain with evidence, patch with proof, then rotate what the attackers already read.”
Database Mart support — Magento incident response and maintenance-window execution on USA hosting infrastructure. Published for teams evaluating a USA hosting provider with real forensics, not ticket closing only.