In cleanup work, this is one of the stranger patterns we watch for. A site owner insists nothing changed on their end, and when we check, they're usually right. WordPress core current. Every plugin current. Admin password long and unique. None of the usual causes fit, because the usual causes aren't what happened. The infection came in through another site sharing the same hosting account, not through anything on theirs.
This happens more than most site owners realize. Shared hosting puts multiple sites in one account, sometimes one server, and a hack on one can spread to the rest without anyone doing anything wrong. People call it cross-contamination, and it flips the usual security advice on its head. You can do everything right and still get hit.
Two questions matter here: what actually lets a hack jump from one site to another, and how do you find out if your own hosting account makes that possible right now.
What Cross-Contamination Actually Is
Security researchers have a specific term for this: cross-contamination. It means malware reaches your site through a neighbor, not through anything you did.
A normal hack starts with a weakness on your own site, something like an outdated plugin or a guessed password. Cross-contamination skips that step entirely. The attacker never touches your code first. They break into a different site on the same server, then use that as a way in to yours.
From the outside, the two look the same. Same malicious files, same spam injections, same blacklist warning from Google. The difference only shows up once you ask where the infection actually started, and it's a different question from most of what our why WordPress sites get hacked piece covers, since that one is about weaknesses on your own site. This is about what happens when the weakness sits on someone else's.
It's also a different animal from an attack like the ClickFix fake-Cloudflare attacks we've documented elsewhere, which start by tricking a visitor into running a command themselves. Cross-contamination never needs a visitor to do anything. It moves entirely on the server side.
How a Hack Jumps From One Site to Another
Most shared hosting accounts run every site under one system user. Every WordPress install on that account shares the same file permissions and the same PHP process. Nothing separates them from the inside.
That setup opens a specific trick called a symlink attack. A script on the hacked site creates a link pointing at a file that belongs to a different site on the same account. Through that link, the script reads the second site's wp-config.php file, which holds database credentials. Once an attacker has those, they don't need a plugin vulnerability or a weak password on your site. They already have a way in.
Some hosts block this. A setting called open_basedir can stop PHP from reaching outside its own folder, and proper account isolation, the kind built on tools like CloudLinux CageFS, blocks it at a deeper level. Plenty of budget shared hosting plans skip both.
This isn't a rare edge case. In 2021, Wordfence disclosed an attack where a malware kit called AnonymousFox used exactly this method to jump from one infected WordPress site to multiple other accounts on the same server. The whole spread took under 90 minutes.
Ninety minutes is faster than most site owners check their own dashboard.
Signs It Was Your Neighbor, Not You
A few things point to a neighbor, not you. They sit alongside the more general signs your WordPress site is hacked, narrowed down to where these particular signs actually came from.
Your plugins, theme and WordPress core were current before the infection. Your admin password was long and unique. Nothing on your side had changed in weeks.
The malicious files turned up somewhere you never go. A PHP file sitting inside your uploads folder, where nothing should ever execute. An unfamiliar theme folder you didn't install. Files like that don't come from a vulnerability in your own plugins. They come from someone dropping them in from outside your site entirely.
The timing doesn't line up with anything your team did either. No update, no new plugin, no login from an unfamiliar location around when the infection appeared.
And if you check, other unrelated sites on the same server show the same blacklist warnings around the same week. A quick reverse IP lookup shows every domain sharing your server's address, and two or three of them going down at once isn't a coincidence.
None of this is proof on its own. Together, it's a strong pattern. If you want to walk through it more carefully, our hacked-site investigation guide covers the fuller diagnostic process.
How to Find Out If Your Host Actually Isolates You
Three questions tell you where you stand.
Ask your host whether the account runs on CloudLinux CageFS or something equivalent. That's the layer that stops one site from reading another site's files, even when they sit on the same server.
Ask whether your PHP process runs separately from everyone else on the account, or whether it's shared. A shared process is what makes the symlink trick from the last section possible in the first place.
Ask what happens if another site on the same server gets hacked. Some hosts scan and lock down every account automatically. Others only touch the one account that got reported, and leave the rest exposed until someone notices on their own.
Most site owners never ask any of this before signing up. The answers usually decide whether a neighbor's hack stays their problem or becomes yours too.
What to Do If You've Been Cross-Contaminated
Cleaning your own site is not the end of this.
If the source account is still live and still infected, your site gets reinfected within days. The attacker still has the same way in they used the first time, and removing the malware from your files without fixing the account it came through just resets the clock.
Push your host to scan and lock down the whole account, not just the site that got reported. This matters more than anything else here.
Rotate every credential connected to the site: WordPress admin, database, FTP or SFTP, and the hosting panel itself. Assume all of them were exposed, not just the one the attacker actually used.
This is exactly the kind of case our malware removal service is built to catch: clean the site, then push to get the account itself secured, not just the one domain that got reported. If you want the full process we use, it's written up in How to Manually Scan and Clean WordPress Malware and in our recovery case study.
Reducing the Risk Going Forward
Cleaning up one hack answers the immediate problem. It doesn't answer when to actually change hosting.
One low-traffic personal site sharing an account with a couple of others is not much of a risk. A business site sharing an account with unrelated sites nobody is actively managing is a different calculation entirely.
The lever that matters most is simple. Once a site does real business, put it on its own hosting account, not a five-domains-for-one-price deal and not a shared reseller plan. Its own account, isolated from whatever mistakes anyone else makes.
If a full move to managed WordPress hosting isn't realistic yet, look for a host that states isolation clearly instead of leaving it to a support ticket answer. Hostinger runs CloudLinux with LVE containers for exactly this, isolating each account instead of pooling everyone into the same shared space.
This one change removes most of the risk in this article. Everything else here matters less once nothing else is sharing your account.