Skip to content
Security

WHMCS Hacked? What to Do in the First Hour and After (2026)

If WHMCS is hacked, lock the Admin Area, save evidence, rotate admin, API, database and gateway credentials, then remove backdoors, find the entry point and patch.

WHMCSPilot Team Published Updated 10 min read
WHMCS Hacked? What to Do in the First Hour and After (2026)

If your WHMCS has been hacked, contain it before you clean it: lock the Admin Area to your own IP addresses, copy files, database and logs as evidence, then rotate every credential WHMCS holds, from admin passwords and API credentials to the database password in configuration.php and your gateway keys. Only after that should you remove backdoors, find the entry point and patch it. This guide is for hosting, VPS and IPTV business owners running self-hosted WHMCS 8.13 or 9.x.

Key takeaways

  • Do not wipe or restore the site first. Evidence you delete in the first hour is evidence you need to find the entry point.
  • Maintenance Mode alone does not stop an attacker: WHMCS keeps the Admin Area, API and hooks running while it is on.
  • Changing an admin password does not invalidate that admin's API credentials. Delete and reissue those separately.
  • Do not simply edit cc_encryption_hash. WHMCS cannot decrypt stored data with any other value, so rotate the secrets it protects instead.
  • WHMCS versions before 8.13.7 and 9.0.8 lack the fix for CVE-2026-67399, an unauthenticated remote code execution flaw.
  • Card data exposure means calling your acquirer or payment processor; personal data exposure may mean regulator and customer notices.

What are the signs that WHMCS has been hacked?

A hacked WHMCS install usually shows itself through changes nobody on your team made. Look for these signs:

  • Admin accounts you did not create at Configuration > System Settings > Administrator Users, or logins from unknown IP addresses in the Admin Log.
  • New entries at Configuration > System Settings > Manage API Credentials, or a changed API IP Access Restriction.
  • Payment gateway settings that point to an account you do not own, or payments missing from the Gateway Log.
  • Edited email templates, or customers forwarding phishing emails that quote real invoice numbers.
  • Unknown PHP files in /includes/hooks, /modules, /templates, attachments or downloads.
  • Domains transferred or registered without an order, or hosting accounts created outside the normal module log.
  • Abuse reports from your data center about outbound spam or attacks from the server.

What should I do in the first hour after a WHMCS hack?

The first hour after a WHMCS compromise is about stopping further damage and keeping evidence. Work from a device you trust, not the computer that may have leaked an admin password.

  1. Lock the Admin Area. Add an .htaccess rule in the admin directory that allows only your own IP addresses, as the WHMCS Banned IP Addresses guide describes.
  2. Close the client side if needed. Turn on Maintenance Mode in the General tab at Configuration > System Settings > General Settings. If gateway settings or email templates were tampered with, also pause the cron job and turn on Disable Email Sending in the Mail tab until you have checked them.
  3. Preserve evidence. Copy the full WHMCS directory, a database dump, web server access and error logs, and control panel, FTP and SSH logs. Export the Admin Log, Activity Log, Gateway Log, Module Log and Email Message Log. Snapshot the server if it is a VPS. Store copies off the server and write down every action with the time.
  4. Call your acquirer first if cards are involved. If card data was stored on the server or the checkout was altered, card brands may require a forensic investigation, and Visa's response checklist says not to log in to or change passwords on at-risk systems before that.
  5. Rotate hosting access. Change the control panel, SSH and FTP passwords, remove unknown SSH keys and check the crontab for entries you did not add.
  6. Rotate the database password. Set a new password for the WHMCS database user, then update db_password in configuration.php. The file normally sits at 400 permissions, so loosen them for the edit and set them back.
  7. Clean up admin accounts. Disable or delete unknown admins, reset every remaining admin password and require two-factor authentication. In WHMCS 9.1, changing a password also ends that admin's Remember Me sessions on every device.
  8. Reissue API credentials. Delete every credential pair in Manage API Credentials, create new ones with the fewest API roles each integration needs, and review api_access_key in configuration.php.
  9. Rotate third-party secrets. Replace gateway keys and webhook secrets, registrar API keys, server module passwords and tokens (cPanel, Plesk, VPS and IPTV panels), SMTP credentials and DNS or CDN tokens. In Stripe, rotate a compromised key with the expiry set to Now, which deletes the old key, as Stripe's API key documentation explains.
  10. Patch. Update to the latest supported release. The WHMCS advisory for CVE-2026-67399 says an unauthenticated user could use it to execute code on the server, and that 8.13.7 and 9.0.8 contain the fix.

What should I do about cc_encryption_hash after a WHMCS hack?

The cc_encryption_hash value in configuration.php is the key WHMCS uses to encrypt sensitive data such as stored card details, passwords and security questions. If the attacker read both configuration.php and the database, assume they can decrypt everything that key protects.

  • Do not just replace the value. WHMCS's documentation says it cannot decrypt your stored data with any other value, so a new hash leaves existing encrypted data unreadable without making it safe.
  • Keep the original. Save a copy of the current configuration.php with your evidence. A database restore is useless without its matching hash.
  • Rotate what it protects. Replace the external credentials listed above, because that is what the attacker can actually reuse.
  • Remove stored cards. If you keep card numbers locally, move to a tokenizing gateway and use Delete Encrypted Credit Card Data in the Security tab at Configuration > System Settings > General Settings. It does not delete remote gateway tokens, and it cannot be undone.
  • Ask WHMCS before changing the key. WHMCS does not document a self-service rotation procedure for this value, so open a ticket with WHMCS Technical Support if you want a new hash.

How do I clean a hacked WHMCS installation?

Cleaning a hacked WHMCS install means replacing what you can and reviewing what you cannot replace. Edit nothing in place until your evidence copy is safe.

  1. Download a fresh copy of the WHMCS release you will run and replace every core file with it rather than editing suspect files.
  2. Compare the old directory with a clean copy of the same version, for example with diff -rq, to list added and modified files for your report.
  3. Review /includes/hooks file by file. WHMCS runs every PHP file in that directory unless its name starts with an underscore, which makes it a favorite place for backdoors.
  4. Reinstall third-party modules from the vendor's current download and look for unexpected hooks.php files inside module folders.
  5. Restore your custom theme from version control or the vendor package, and empty templates_c.
  6. Remove any PHP file in attachments, downloads or other upload folders. Those folders should never contain code.
  7. Check the database through the Admin Area: Administrator Users and Roles, API credentials, Payment Gateways, Domain Registrars, Servers, Addon Modules, Email Templates, announcements and product descriptions for injected scripts or links.
  8. Check the rest of the hosting account. A web shell in another site on the same account will put the attacker straight back in.
  9. If the attacker reached root, or you cannot tell, rebuild the server and move WHMCS onto it with clean files and the checked database.

If you would rather hand this to someone else, our hacked WHMCS cleanup and recovery service covers containment, file and database review, credential rotation and a written incident report.

How do I find how the attacker got into WHMCS?

Finding the WHMCS entry point means working backward from the earliest sign of the attack. Take the oldest suspicious admin login or file change, then read the web server access logs from just before it. File timestamps can be faked, so trust logs over modification dates.

Likely entry pointEvidence to look forWhat closes it
Unpatched WHMCS versionA version older than the latest security release, unusual POST requests to client-facing pages just before the first changeUpdate to the latest supported release
Vulnerable or tampered third-party moduleRequests to module file paths, module files that differ from the vendor's copyUpdate or remove the module
Stolen admin passwordAdmin Log logins from unfamiliar IP addresses or at odd hoursTwo-factor authentication, admin IP restriction, renamed admin directory
Another application in the same accountWeb shells or the oldest changed files outside the WHMCS folderSeparate accounts, clean or remove the other application
Hosting account or server accessControl panel, FTP or SSH logins you cannot explain, new SSH keys or cron jobsRotated credentials, server rebuild
Exposed filesRequests for .sql, .zip or .git files, a Sensitive Directory Check notice in System HealthBackups moved out of the web root, writeable directories moved

How do I harden WHMCS after the cleanup?

Hardening WHMCS after a hack starts with the official Enhancing Security checklist, which older WHMCS documentation called Further Security Steps:

  • Move writeable directories out of the web root and set configuration.php to 400.
  • Move the crons directory above the web root and rename the admin directory.
  • Restrict the Admin Area to fixed IP addresses where your staff has them.
  • Serve WHMCS only over HTTPS and send a Content Security Policy frame-ancestors header against clickjacking.
  • Remove database privileges WHMCS does not need day to day, and block web access to the vendor directory.
  • Require two-factor authentication for every admin, keep the Failed Admin Login Ban Time above zero, and clear every System Health warning.

Our WHMCS security hardening guide covers each step in depth, and the WHMCS security audit checks them for you. For ongoing monitoring, the WHMCS Security module lists malware scanning, admin activity logging and alerting, and 2FA enforcement among its features; its listing shows compatibility with WHMCS 8.13. Other tools are in our WHMCS security modules hub. Keep tested offsite backups too, as described in our backup and disaster recovery guide.

Do I have to tell customers and payment providers about a WHMCS hack?

Whether you must report a WHMCS breach depends on what data was exposed and where you and your customers are. Get legal advice for your situation, but plan for these cases:

  • Card data. If card numbers were stored, or payment pages or gateway settings were altered, notify your acquirer or payment processor straight away. Visa asks merchants to complete its incident report within three calendar days.
  • Gateway accounts. If gateway keys were exposed, rotate them, review the gateway's request logs and contact the provider's support about any charges or refunds you did not make.
  • EU and UK personal data. Under GDPR Article 33, a controller must notify the supervisory authority without undue delay and, where feasible, within 72 hours of becoming aware of a breach, unless the breach is unlikely to result in a risk to people. Article 34 adds a duty to tell the affected people when the risk is high.
  • Other regions. Many US states and other countries have their own breach notification laws with different triggers and deadlines.
  • Customers. Tell them what happened, what data was involved, what you have done and what they should do: change their passwords, distrust emails asking for payment details, and type your URL instead of clicking links.

Frequently asked questions

Should I restore a backup after my WHMCS was hacked?

Only from a backup taken before the compromise, and only after you know the entry point. Restore the database if needed, but take WHMCS files from a fresh release, because an older file backup may already contain the backdoor.

Does changing admin passwords stop API access in WHMCS?

No. WHMCS documentation says you can change an admin's password without invalidating their API credentials, so delete and reissue credential pairs at Manage API Credentials as a separate step.

Do I need to change cc_encryption_hash after a WHMCS hack?

Not by editing it directly, because WHMCS cannot decrypt existing data with a different value. Rotate the external credentials it protects, delete locally stored card data, and ask WHMCS Technical Support before replacing the hash.

When should I rebuild the server instead of cleaning WHMCS?

Rebuild when the attacker reached root, when you find changes outside the WHMCS account, or when you cannot rule either out. Cleaning files on a server you no longer trust leaves room for a backdoor you did not find.

How do I know which WHMCS version fixed a vulnerability?

Check the WHMCS security advisories at help.whmcs.com and the change log for your version on docs.whmcs.com. For example, the 8.13 and 9.0 change logs list the CVE-2026-67399 fix in 8.13.7 and 9.0.8.

If you are dealing with an active incident, our hacked WHMCS cleanup service starts with containment as soon as we have access.