WordPress News
WordPress Hacked: How We Used AI to Recover
Our WordPress store was compromised by the wp2shell attack exploiting a critical REST API vulnerability. Here’s how we used OpenAI Codex as a supervised tool to investigate, contain, and recover while keeping humans in control of every critical decision.
When Your WordPress Store Gets Compromised
Nobody wants to write about getting hacked. Regarding WordPress hacked, However, earlier this week, our store showed clear signs of an unauthorized WordPress compromise. We treated it as an incident that needed immediate attention, not a puzzle to solve later.
Our response was methodical. We preserved evidence first, then found how the attacker got in. After that, we contained the damage, recovered access, patched the vulnerable software, and verified every customer-facing function. WordPress later confirmed that version 7.0.2 fixed a critical REST API batch-route issue that could lead to remote code execution.
Therefore, this is our story of recovery. More importantly, it is a practical guide for what to do when your WordPress site faces a similar threat.
How We Used AI Without Handing Over Control
We used OpenAI Codex as part of our response team. That does not mean we let an AI make decisions and walked away. Instead, Codex helped our people investigate evidence and compare system state.
The AI performed repeatable integrity checks and documented every approved recovery step. Meanwhile, every destructive or customer-impacting action stayed behind human authorization. We also maintained a verified rollback path for each change.
This approach turned AI into a supervised operational partner, not a replacement for human judgment.
What Happened to Our Store
Our investigation found evidence consistent with the publicly reported wp2shell campaign. An attacker exploited a WordPress Core vulnerability to gain unauthenticated access. Next, they tried to establish persistence using a malicious plugin and unauthorized administrator accounts.
We will not publish the specific route, payload, or code involved. Those details help attackers more than they help site owners defend their businesses.
According to an independent researcher, affected installations included WordPress 6.9.0 through 6.9.4 and 7.0.0 through 7.0.1. Therefore, WordPress 7.0.2 became the recommended fix. Searchlight Cyber’s advisory suggested temporary batch-API blocking as an emergency measure only when immediate updates were not possible.
Understanding the Attack Without Arming Bad Actors
At a high level, the vulnerability involved confusion in a WordPress REST API batch route. It was chained with a database-query issue. That combination let an unauthenticated attacker reach server-side code execution on affected versions.
Once an intruder gets that foothold, their next objective is usually persistence. They might install a web shell, create a rogue administrator, alter files, or steal application secrets.
That is why simply updating WordPress is not enough after a suspected compromise. A patch closes the known door. However, it does not automatically remove someone who walked in before you locked it.
Our Step-by-Step Recovery Process
Codex turned a stressful situation into an evidence-driven checklist. First, we preserved a dated backup and all incident evidence before making any changes.
Next, we inventoried administrator accounts and active plugins. Additionally, we checked recently changed files, scheduled tasks, WordPress Core integrity, and the store’s payment and email systems.
After thorough human review, we took decisive action. We removed the unauthorized administrator accounts and quarantined the malicious code. Then we rotated the store administrator credential, invalidated all WordPress sessions, and refreshed the site’s security keys.
Verification and Testing
We reinstalled and verified clean WordPress Core files. Then we updated the store to WordPress 7.0.3 and verified Core and Easy Digital Downloads checksums. Finally, we tested the live homepage, account pages, and checkout process.
The key distinction is accountability. Codex could inspect, compare, and execute approved steps quickly. Meanwhile, our team decided what evidence mattered, approved changes, protected backups, and verified results.
What We Found About Payment Security
We found no evidence that raw card numbers or CVVs were stored in the store database. Our store uses payment providers for card processing. That does not replace provider-side review, though.
An attacker with server access may be able to read configuration and application secrets. Therefore, businesses in this position should rotate payment-provider API credentials immediately. They should also review provider dashboards and payout settings.
We checked the store’s available email and license records. Those checks did not show logged outbound mail or newly created license records during the incident window. However, missing records are not proof that nothing was accessed or copied.
A Safe AI Prompt for Your Own Recovery
If you run WordPress, you do not need to understand exploit development to use AI productively. Start with a tightly scoped, defensive instruction like this:
“Treat this as a suspected WordPress compromise. Do read-only triage first: preserve evidence; list administrator accounts, active plugins, recent PHP files, and scheduled tasks; compare WordPress Core and plugin checksums; review payment and email exposure; then propose a scoped containment plan. Do not reset passwords, delete users, or publish changes until I approve.”
Then review and approve the plan carefully. Tell the AI to execute only necessary recovery actions. That can include quarantining confirmed malicious code, removing confirmed rogue accounts, rotating credentials and sessions, and patching WordPress and plugins.
Afterwards, re-run integrity checks and test your public checkout and account functions. Keep a written record of every change.
When to Bring in Professional Help
If your site is a store, bring in your payment provider and a qualified incident-response professional when the facts warrant it. Some situations require expertise beyond what AI can provide.
Our Current Status and Recommendations
WordPress’s July 17 security release confirmed that version 7.0.2 addressed the REST API batch-route confusion and SQL-injection issue. The project recommended immediate updates for all users.
Our store now runs WordPress 7.0.3, beyond that fixed release. Core checksum verification passed. Additionally, live homepage, account, and checkout checks all passed successfully.
We reviewed WordPress’s published security release and reporting guidance. Because this incident concerns a known, patched issue, we preserved sanitized evidence and will provide it through an approved private channel if WordPress requests it.
Key Lessons for WordPress Security
For anyone facing WordPress hacked recovery: patch first, but do not stop there. Preserve evidence, find persistence mechanisms, rotate secrets, validate the application, and test the functions that make your business money.
AI can help defenders meet attackers on equal footing. However, it needs the right access, clear boundaries, and a human team that insists on proof at every step.
Update immediately if you are running WordPress 6.9.0 through 6.9.4 or 7.0.0 through 7.0.1. Then verify that your site is truly clean, not just patched. Your business depends on it.
Key Takeaways
- WordPress later confirmed that version 7.0.2 fixed a critical REST API batch-route issue that could lead to remote code execution.Therefore, this is our story of recovery.
- Those details help attackers more than they help site owners defend their businesses.According to an independent researcher, affected installations included WordPress 6.9.0 through 6.9.4 and 7.0.0 through 7.0.1.
- Then we updated the store to WordPress 7.0.3 and verified Core and Easy Digital Downloads checksums.
- Finally, we tested the live homepage, account pages, and checkout process.The key distinction is accountability.
- The project recommended immediate updates for all users.Our store now runs WordPress 7.0.3, beyond that fixed release.
Original Source: techmymoney.com
Sources
- WordPress Hacked? How OpenAI Codex Helped Us Fight Back — techmymoney.com

