Cyber Security

Fix cPanel Hack: CVE-2026-41940 WordPress Cleanup Guide

Could your WordPress site be hacked right now, without anyone ever seeing your wp‑admin login?

This is not a hypothetical. In the spring of 2026, a critical zero‑day vulnerability in cPanel quietly handed attackers full server‑level control over tens of thousands of hosting machines. The Shadowserver Foundation reported exploitation spikes crossing 44,000 IP addresses by April 30, 2026, many of which hosted multiple WordPress sites under a single cPanel account.

The flaw, tracked as CVE‑2026‑41940, carries a CVSS 3.1 score of 9.8 out of 10. It requires no password, no phishing email, and no user interaction. An unauthenticated attacker who can reach your cPanel login page can escalate to a root‑privileged WHM administrator in a single HTTP flow. Once inside, every website, database, and file on that server is reachable.

Given that WordPress powers 43.4% of all websites and a large share of that traffic runs on cPanel‑based shared hosting, this vulnerability directly targets countless blogs, business sites, and WooCommerce stores, many of which have no idea their hosting control panel has been weaponised.

If your WordPress site is hosted on cPanel, knowing what happened, how it reached your WordPress files, and how to recover and harden your environment is no longer optional. At WP Hacked Help, we’ve already begun receiving WordPress malware removal requests directly linked to this cPanel exploit, and this guide covers everything you need to know and do right now.

What is CVE‑2026‑41940 and Why Should WordPress Users Care?

CVE‑2026‑41940 is a critical authentication bypass in cPanel & WHM (and WP Squared), the control panel stack that underpins most shared, VPS, and reseller hosting environments.

The vulnerability resides in the cpsrvd daemon, which handles login and session processing. 

Attackers bypass authentication entirely by abusing CRLF injection and malformed session cookies, then exploit a quirk in how cPanel re‑reads cached sessions to promote an unauthenticated session to a fully authenticated admin‑level session.

This bypass is pre‑authentication and remote, which is why the NVD entry lists it with a CVSS 3.1 score of 9.8. Because the flaw lives beneath your WordPress installation, nothing inside wp‑admin, including two‑factor authentication, firewall plugins, and complex passwords, can block the initial server‑level breach.

Am I on cPanel? How to Check Your Hosting in 30 Seconds

Not all hosting is cPanel hosting. Before reading further, confirm your exposure:

  • Log in to your hosting account. If you see a dashboard with icons for File Manager, Email Accounts, MySQL Databases, and Softaculous, you are on cPanel.
  • Check your welcome email. A login URL containing 2083 or 2087 confirms cPanel hosting.
  • Safe hosting types NOT affected: WP Engine, Kinsta, Flywheel, and Pressable use proprietary control panels and are not impacted by CVE‑2026‑41940.

Common cPanel‑based hosts where WordPress users are at risk include BluehostHostGatorNamecheap shared plans, InMotion Hosting, and GoDaddy shared/resellerplans. If you’re on any of these and your host has not confirmed patch status, treat your site as potentially exposed until verified.

How Does the Attack Work? From a Single HTTP Request to Full Server Takeover

Understanding the mechanics matters because it explains why no WordPress‑level security measure could have stopped this. The breach happens at a layer completely above your WordPress installation.

The attack chains three independent flaws:

Flaw 1 — CRLF injection in the session writer. cPanel’s login handler fails to sanitise carriage return/line feed (\r\n) characters in the HTTP Authorization header. An attacker injects these characters to write user=root directly into the session file on disk.

Flaw 2 — Encryption skip via malformed cookie. A malformed whostmgrsession cookie value causes the encryption layer to be bypassed entirely, so the injected session file is written in plain text that cPanel later accepts as legitimate.

Flaw 3 — Session promotion on reload. A quirk in how cPanel re‑reads cached sessions causes the poisoned, unauthenticated session to be promoted into a fully authenticated administrator session.

The entire chain requires no valid credentials and no prior account access — only network access to the cPanel login port.

What Can Attackers Do Once They’re Inside Your Server?

With root‑level WHM access, attackers can 

  • Read or delete every file across all hosted accounts.
  • Access every MySQL database; create new WHM administrator accounts or plant SSH keys for persistent re‑entry;
  • Modify firewall rules and disable security logging, and
  • Install cryptocurrency miners or DDoS botnet clients at the OS level.
  • Also deployed persistent access tools, including OpenVPN and Ligolo,, meaning many compromised servers remain under attacker control even after patching.

When did the cPanel Hack Start? A Complete Timeline from February to May 2026

One of the most alarming facts about CVE‑2026‑41940 is not the vulnerability itself — it is how long it was actively exploited before any patch existed.

DateEvent
Feb 23, 2026KnownHost CEO Daniel Pearson confirms exploitation attempts dating back to February 23, attackers likely probing even earlier. Silent zero-day period begins with no patch or advisory in existence.
Late Feb – Apr 27, 202664-day silent zero-day window, vulnerability reported to cPanel ~2 weeks before disclosure; cPanel’s initial response was “nothing is wrong“. Servers are compromised at scale without defenders knowing.
Apr 28, 2026WebPros publishes the official cPanel security advisory and releases patched builds: 11.110.0.97, 11.126.0.54, 11.136.0.5, WP Squared 11.136.1.7. KnownHost, Namecheap, HostPapa, and InMotion immediately block ports 2083 and 2087.
Apr 29, 2026NVD assigns a CVSS 9.8 Critical rating to CVE‑2026‑41940, classified as CWE-306 (Missing Authentication for Critical Function). CVSS v4.0 score of 9.3 was also published. cPanel releases updated detection script for session-file indicators of compromise.
Apr 30, 2026Cloudflare deploys emergency WAF rules for CVE‑2026‑41940 at the network edge. Exploitation spikes to its peak: the Shadowserver Foundation records 44,000 compromised IPs scanning and running exploits in honeypot sensors.
Apr 30 – May 1, 2026CISA adds CVE‑2026‑41940 to the Known Exploited Vulnerabilities catalog — confirming active exploitation in the wild. Federal Civilian Executive Branch agencies have been given a mandatory patch deadline of May 3, 2026.
May 2, 2026Multi-actor exploitation confirmed — Ctrl-Alt-Intel identifies a distinct cyber-espionage campaign targeting government and military domains in the Philippines and Laos, alongside MSPs in Canada, South Africa, and the US. State-sponsored involvement suspected.
May 3, 2026Exploitation drops to ~3,540 IPs as emergency patching and automated cleanup efforts progress. Persistent access tools (OpenVPN, Ligolo) found on servers suggest many remain under attacker control despite cleanup.

The gap between confirmed first exploitation (February 23) and patch release (April 28) spansat least 64 days, giving attackers ample time to plant backdoors, data‑exfiltration scripts, and ransomware payloads before any fix was available.

What Happens to Your WordPress Site When cPanel Is Hacked?

This is the question most security articles about CVE‑2026‑41940 fail to answer. They cover the server mechanics. They cite the CVSS score. But they stop short of explaining what a cPanel compromise looks like from inside a WordPress installation — and why the blast radius extends to every tenant on the affected server.

Why Does Hacking One cPanel Server Compromise Every Site on It?

cPanel’s architecture is designed for multi‑tenancy. A single WHM‑managed server can host anywhere from dozens to hundreds of individual cPanel accounts, each running one or more WordPress sites. When an attacker gains WHM root access, they operate above the isolation layer that separates those tenants.

Think of it this way: each WordPress site occupies its own apartment. cPanel is the building management system. WHM is the property manager with a master key. CVE‑2026‑41940 hands an attacker the master key — access to every apartment, the electrical panel, the mail room, and the security system simultaneously. 

A single compromised WHM instance can expose hundreds of downstream customer accounts.

This holds true regardless of how strong your WordPress admin password was, whether you had a WordPress security plugin active, whether your site had an SSL certificate, or whether you had two‑factor authentication on wp‑admin. None of those defences operate at the server layer. The attack never touched your wp-login.php.

What Do Attackers Actually Do Inside Your WordPress Files and Database?

Based on post‑compromise forensics documented by Help Net Security and Nocinit, the following actions are consistently observed:

  1. Database credential harvesting via wp‑config.php. Attackers read wp-config.php to copy DB_NAME, DB_USER, DB_PASSWORD, and all WordPress secret keys, enabling direct MySQL access without touching the WordPress UI. This is why securing wp-config.php is a foundational hardening step.
  2. PHP backdoor shells in wp-content/uploads/. The uploads directory is rarely audited. Attackers drop PHP web shells here, which can execute remote commands, download additional payloads, or exfiltrate data, and survive WordPress plugin scans and even a core reinstall.
  3. Hidden admin accounts in the database. By injecting directly into wp_users and wp_usermeta via MySQL, attackers createWordPress backdoor admin accounts that may not appear on the default Users screen unless you explicitly filter by role.
  4. Redirects and injected code in wp_options. The siteurl, home, and active_plugins options are rewritten to redirect visitors to phishing pages or malware sites — the classic WordPress malware redirect hack. JavaScript payloads may be injected using eval, base64_decode, or document. write.
  5. Abuse of cPanel email infrastructure. With full SMTP access, attackers send bulk phishing emails from your domain, triggering Google Safe Browsing alerts and email blacklisting.
  6. Sorry, ransomware deployment. In the most destructive cases, attackers deploy Sorry ransomware, encrypting all accessible web files and database dumps with the .sorry extension and wiping cPanel’s own backup directories.

What is Sorry Ransomware and What Does It Do to Your WordPress Files?

Sorry, ransomware is a Linux‑targeted encryptor written in Go, explicitly tuned for cPanel‑style web‑hosting environments. It is one of the WordPress ransomware variants that specifically targets multi‑tenant hosting infrastructure to maximise blast radius.

Upon execution, it enumerates files under document‑root directories and encrypts each with a unique ChaCha20 key, then encrypts those ChaCha20 keys with an RSA‑2048 public key held only by the attacker. Encrypted files are saved with the .sorry extension, and a ransom note (README_DECRYPT.txt or SORRY.txt) is dropped in the web root.

For WordPress, this means:

  • Images, PDFs, and media in wp‑content/uploads/ become .sorry files
  • Themes in wp‑content/themes/ and plugins in wp‑content/plugins/ are encrypted, breaking the site entirely
  • Core files in wp‑includes/ and wp‑admin/ are encrypted, preventing all admin access
  • Any MySQL dump stored on the filesystem is also encrypted
  • cPanel’s built‑in backup directory is either wiped or encrypted — eliminating the on‑server restore path

No public decryptor exists for this variant. The RSA‑2048 layer means brute‑force recovery is not mathematically feasible.

Can You Recover from Sorry Ransomware Without Paying?

The only realistic path is a clean, off‑site backup created before the compromise window — ideally before February 23, 2026.

Each file is encrypted with a unique ChaCha20 key, and those keys are then encrypted with the attacker’s RSA‑2048 public key. The attacker’s private key is never stored on the victim server. No working decryptor has been released for this campaign, and paying the ransom is not a guaranteed recovery path.

If you have a backup stored outside the cPanel environment on Amazon S3, Google Drive, Dropbox, Backblaze B2, or managed backup services, you can restore a clean snapshot. If you only have cPanel’s native backups, those are typically stored on the same server and are therefore also encrypted or deleted. 

In that case, full recovery means rebuilding WordPress from scratch, reinstalling clean plugins and themes from the official repository, and importing sanitised content from the database.

How Do You Know If Sorry Ransomware Has Hit Your WordPress Site?

You have been hit by Sorry ransomware if any of the following are true:

  • Files in your web root carry the .sorry extension
  • WordPress returns a 500 error or a blank white screen
  • A file named README_DECRYPT.txt or SORRY.txt exists in your web root
  • wp-admin is completely inaccessible with no error page
  • Your cPanel File Manager shows only .sorry files across all directories
  • Your host’s backup restore tool reports no valid backup available

How to Check If Your cPanel Server or WordPress Site has Been Hacked

Detection runs on two parallel tracks. Both are necessary; server indicators alone miss WordPress‑layer persistence, and WordPress‑layer checks alone miss active server‑level access that may still be live.

What to Look For If You Have Server Access (Admin Track)

Step 1: Run cPanel’s updated detection script. Download and run the revised version of cPanel’s detection script (not the original — it produced significant false positives and was replaced on April 29). The script scans /var/cpanel/sessions/raw/ and flags session files containing both token_denied markers and authenticate fields in the same session — a confirmed indicator of CVE‑2026‑41940 exploitation.

Step 2: Audit SSH keys on all accounts. Run cat ~/.ssh/authorized_keys for root and each cPanel account. Any unrecognised public key is a server-level backdoor that will survive a password reset.

Step 3: Check for rogue cron jobs.

crontab -l

foruserin$(cut -f1 -d: /etc/passwd);do

crontab -u $user -l 2>/dev/null

done

Legitimate hosting environments rarely carry arbitrary root cron jobs; unknown entries often indicate post‑exploitation persistence tasks.

Step 4: Review WHM API tokens. In WHM, navigate to Development → Manage API Tokens. Any token not explicitly created by your team should be revoked immediately; attacker‑created tokens survive password changes.

Step 5: Hunt for crypto miners or botnet clients.

ps aux | grep -E ‘xmrig|minerd|kswapd0|ld-linux’

netstat -tulnp | grep ESTABLISHED

Mirai botnet variant nuclear.x86 was specifically documented targeting vulnerable cPanel installations in this campaign. Compromised servers were used to drop cryptocurrency miners and DDoS bot clients alongside web‑targeting payloads.

What to Check Inside WordPress If You Don’t Have Server Access?

Check 1: Run a WordPress malware scan. Use Wordfence or MalCare to perform a full file integrity scan. These tools compare file checksums against the official WordPress repository and flag modified or injected files — including obfuscated PHP in wp-config.php or unknown .php files in wp-content/uploads/. This is the same approach our team uses during a WordPress malware removal engagement.

Check 2: Audit admin users in the database. Access phpMyAdmin via cPanel and run:

SELECT ID, user_login, user_registered, user_email

FROM wp_users

ORDERBY user_registered DESC;

Any admin account created after February 23, 2026, that you did not create is suspect.

Check 3: Check wp_options for redirect injections.

sql

SELECT option_name, option_value

FROM wp_options

WHERE option_name IN (‘siteurl’,’home’,’admin_email’,’active_plugins’,’template’,’stylesheet’);

Verify siteurl and home match your domain. Then search for injected code:

sql

SELECT option_name, option_value

FROM wp_options

WHERE option_value LIKE ‘%eval(%’

OR option_value LIKE ‘%base64_%’

OR option_value LIKE ‘%document.write%’;

The eval(base64_decode(…)) pattern is a signature obfuscated PHP injection technique used across multiple attack campaigns targeting WordPress sites on compromised servers.

Check 4: Use Google Search Console and external scanners. In Google Search Console, go to Security & Manual Actions → Security Issues. Submit your domain to Sucuri SiteCheck and VirusTotal for an external scan of visible malware, blacklists, and injected scripts. If Google has already flagged your site, you may see a “This site may be hacked” warning in SERPs, which requires a manual review request after cleanup.

What to Do Right Now: Patching cPanel and Protecting Your WordPress Site Immediately

The response to CVE‑2026‑41940 divides into two completely different tracks based on whether you manage your own server or whether you are a tenant on someone else’s hosting. Conflating them leads to either dangerous under‑reaction or costly over‑reaction.

If You Manage Your Own Server: 7 Steps to Patch and Verify

Step 1: Update cPanel to a patched build.

/scripts/upcp –force

Ensure your version is at least the patched build for your branch: 11.110.0.97, 11.126.0.54, 11.136.0.5, or WP Squared 11.136.1.7. Verify with /usr/local/cpanel/cpanel -V.

Step 2: Restart cpsrvd.

systemctl restart cpanel

The patch requires a service restart to take full effect.

Step 3: Restrict cPanel ports at the firewall. Using CSF or your cloud‑provider firewall, allow inbound traffic on ports 2083, 2087, 2095, and 2096 only from trusted admin IPs. This removes the internet‑exposed attack surface for the cPanel login entirely.

Step 4: Run the updated detection script. Re‑download the revised detection script from cPanel’s security advisory page and run it against your sessions directory. 

Note: anyone who ran the original version should re‑run the updated script — the initial release had significant false positives.

Step 5: Rotate all credentials. Change the root WHM password, all cPanel account passwords, all MySQL root and per‑database passwords, and all FTP/SFTP credentials. Revoke all WHM API tokens and re‑issue only those actively in use.

Step 6: Purge unknown SSH keys and cron jobs. Remove unrecognised entries from ~/.ssh/authorized_keys for all accounts. Delete any suspicious cron jobs discovered in the audit step.

Step 7: Enable cPHulk and configure thresholds. In WHM → Security Center → cPHulk Brute Force Protection, enable the service and set a threshold of no more than five failed attempts to limit future brute force attacks against the cPanel login.

If You’re on Shared Hosting: What to Ask Your Provider and What to Do Next

You cannot patch the server yourself, but you are not powerless.

Contact your host immediately. Submit a ticket or live chat with this exact request:

“Has CVE‑2026‑41940 been patched on the server hosting my account? Has the detection script been run to confirm no compromise? What is the exact cPanel build version on my server?”

KnownHost, Namecheap, HostPapa, InMotion, and Hosting.com all confirmed rapid patching after the April 28 advisory. Smaller or budget hosts may still lag; assume exposure until explicitly confirmed in writing.

If patch status is unclear, act defensively:

  • Change all WordPress admin passwords and your cPanel account password immediately
  • Update your database password in both phpMyAdmin and wp-config.php
  • Enable WordPress login security with two‑factor authentication using Wordfence Login Security or the Two‑Factor Authentication plugin
  • Request a migration to a patched server if your host operates multiple clusters

Use Cloudflare’s WAF rules. Cloudflare released emergency WAF rules for CVE‑2026‑41940‑style traffic on April 30, 2026. While these do not protect the cPanel login ports directly, they add an inspection layer for HTTP traffic reaching your WordPress site.

Take an immediate local backup. Download a complete copy of your WordPress files and database to your local machine or a cloud storage service outside the cPanel environment. This is your baseline if the server is later confirmed to be compromised.

How to Fix Your WordPress Site After a cPanel Hack: Step-by-Step Recovery Guide

If your server was exposed between February 23 and the point it was patched, treat your site as actively compromised until every step below is complete. Attackers routinely plant multiple persistence mechanisms — removing one backdoor while leaving others is not recovery, it is rearranging the problem.

If Sorry ransomware has encrypted your files, skip directly to Step 6. You cannot meaningfully scan or clean encrypted .sorry files.

Step 1: Take Your Site Offline Before You Do Anything Else

Step 2: Scan Every WordPress File for Hidden Malware

Step 3: Audit wp‑config.php — Attackers Always Go Here First

Step 4: Find and Remove Rogue Admin Accounts from Your Database

Step 5: Clean wp_options and Remove Injected Code

Step 6: Restore from a Clean, Off‑Site Backup

Step 7: Rotate Every Credential Before Bringing the Site Back Live

How to Prevent This from Happening Again: WordPress Security on cPanel Hosting

Recovery addresses today’s damage. Prevention addresses tomorrow’s attack. The CVE‑2026‑41940 campaign exposed a structural risk: WordPress sites on shared cPanel hosting inherit the security posture of a server they don’t control. These measures minimize the inherited risk at both layers.

What Server Admins Should Do to Harden cPanel Long-Term?

  • Enable automatic minor cPanel updates.
  • Restrict cPanel ports by IP.
  • Enable cPHulk Brute Force Protection.
  • Isolate high‑value sites into separate cPanel accounts.
  • Subscribe to cPanel and CISA alerts.

What Questions to Ask Your Hosting Provider Before You Trust Them With Your Site

Your hosting provider’s security posture directly shapes your WordPress risk. Before migrating or renewing, ask — and get answers in writing:

  1. Do you automatically apply cPanel security patches, or must clients request them manually?
  2. What is your median time‑to‑patch for critical (CVSS 9.0+) cPanel vulnerabilities?
  3. Are server backups stored on a separate, isolated system, or on the same server they protect?
  4. Do you offer server‑level WAF or intrusion detection for hosted accounts?
  5. How are customers notified in the event of a confirmed server‑level compromise?
  6. Do you support SFTP‑only connections, or is plain FTP still permitted?

A host that cannot answer these with specific, verifiable details is a host whose security posture you cannot evaluate. 

Get Professional Help: WordPress Malware Removal After a cPanel Breach

If your WordPress site runs on a cPanel‑based host, it now sits on the same infrastructure that left tens of thousands of servers exposed to CVE‑2026‑41940 and Sorry ransomware. Even if you’ve patched and rotated credentials, the hard truth is that attackers who held root access for days or weeks routinely plant multiple persistence mechanisms across different layers of the server. Removing one backdoor while three others remain is not a cleanup. It is a countdown to reinfection.

This is precisely the scenario where DIY cleanup most commonly fails. The WordPress malware removal process after a server-level breach is fundamentally different from cleaning a plugin-based infection. You are not just scanning WordPress files. You are auditing session directories, checking SSH authorised keys, hunting for rogue cron jobs, inspecting the database for injected admin accounts, and verifying that no obfuscated payload survives in wp-content/uploads, mu-plugins, or .htaccess — all while the clock is running on your site’s Google standing and customer trust.

Why WordPress Site Owners Trust WP Hacked Help

WP Hacked Help has spent over a decade specialising exclusively in WordPress security and malware cleanup. This is not a general cybersecurity firm that handles WordPress on the side. Every engineer on our team works only on WordPress, which means we recognise the specific artefacts that CVE‑2026‑41940 exploitation leaves inside a WordPress installation, and we know exactly where to look.

Across more than 1,000 resolved malware cleanup cases, our track record includes:

  • 600+ sites restored to clean environments following server-level compromise, including shared hosting breaches where multiple WordPress installations on the same cPanel account were simultaneously infected
  • 1,200+ malware script injections manually identified and removed — including obfuscated eval(base64_decode(…)) payloads, the exact technique used in this campaign’s post-exploitation phase
  • 400+ PHP web shells purged from wp-content/uploads — the same directory attackers target first after gaining cPanel root access
  • 250+ malicious redirect hacks reversed in 2024 alone — the most common visible symptom WordPress site owners notice after a server-level breach
  • 600+ Google blacklist recoveries completed since 2018 — including submitting successful manual review requests after the site was flagged by Google Safe Browsing following an injection campaign

Our response time for emergency cases is 4–6 hours from submission, with live updates throughout the cleanup process and 24/7 availability for post-cleanup questions.

So, don’t wait and secure your WordPress website today with us!!!

24/7 WP Security & Malware Removal
Is your site hacked or infected with malware? Let us get it fixed for you
Secure My Website(s)

Tags: cPanel zero-day CVE-2026-41940