Aller au contenu principal
Jetpack

Produits individuels

Sécurité
VaultPress Backup Scan Akismet Anti-spam
Performances
Recherche sur le site Boost VideoPress
Croissance
Stats Social Newsletter SEO Blaze CRM
Gestion
Manage Application mobile

Packs de produits

Pro Des outils de sécurité, de performance et de croissance pour votre site WordPress. Complet La suite Jetpack complète, avec des limites de service plus élevées.
Tarifs
Vue d’ensemble Ce que Jetpack AI fait pour votre site Skills Des super-pouvoirs WordPress pour votre agent Documentation Connecter et configurer votre agent IA Bien démarrer Connecter ChatGPT, Claude ou un agent de code Comparer Jetpack face aux autres connecteurs MCP pour WordPress

Connectez votre agent. C’est gratuit.

Connectez ChatGPT ou Claude et laissez-le gérer votre site, sans offre payante.

L’obtenir pour ChatGPT (s’ouvre dans un nouvel onglet) Ou utilisez Claude (s’ouvre dans un nouvel onglet)
Assistance Guides et aide de notre équipe Documentation Des tutoriels pour chaque fonctionnalité de Jetpack Demandes de fonctionnalités Request features and vote on ideas Blog Actualités, nouveautés produit et tutoriels
À propos
Se connecter Commencer
Sécurité
VaultPress Backup Scan Akismet Anti-spam
Performances
Recherche sur le site Boost VideoPress
Croissance
Stats Social Newsletter SEO Blaze CRM
Gestion
Manage Application mobile

Packs de produits

Pro Complet
Tarifs
Vue d’ensemble Ce que Jetpack AI fait pour votre site Skills Des super-pouvoirs WordPress pour votre agent Documentation Connecter et configurer votre agent IA Bien démarrer Connecter ChatGPT, Claude ou un agent de code Comparer Jetpack face aux autres connecteurs MCP pour WordPress

Connectez votre agent. C’est gratuit.

Connectez ChatGPT ou Claude et laissez-le gérer votre site, sans offre payante.

L’obtenir pour ChatGPT (s’ouvre dans un nouvel onglet) Ou utilisez Claude (s’ouvre dans un nouvel onglet)
Assistance Guides et aide de notre équipe Documentation Des tutoriels pour chaque fonctionnalité de Jetpack Demandes de fonctionnalités Request features and vote on ideas Blog Actualités, nouveautés produit et tutoriels
À propos Rechercher
Se connecter Commencer

Blog / Jetpack 101

What to Do if Infected With SEO Spam on WordPress

Avatar de Fioravante Souza

Fioravante Souza Mai 17, 2021 · 6 min de lecture


Sur cette page

  1. The malicious behavior
  2. The indexing paradox
  3. Catching the white rabbit
  4. Closing the case

6 min de lecture

At Jetpack, dealing with different types of web threats and attacks is part of our routine. Most of the time, it ranges from collecting a malicious file and finding the attack vector, to providing assistance on restoring a website from the latest backup. But sometimes we enter a different dimension of really creative attacks, a dimension of inexplicable reinfections — we enter … the twilight zone.

Okay, I’m probably being over-dramatic, but bear with me as I set the scene for this mystery tale. Ready? Please join me on this trip to the realm of ghosts, spam, and search engines.

The malicious behavior

We found a website that was under a very interesting kind of attack. It first surfaced as an email sent by the Google Search Console: an uncommon URL (and a very suspicious-looking one at that, with a clickable URL inside) was listed as a top growing page.

Image showing spam inserted into a URL
Google’s Search Engine Tool’s Top growing pages

The website owner was a bit upset since behavior like this is often the result of an infection, but Jetpack hadn’t detected or warned them about anything. Plus, these pages didn’t even exist on the website when they checked, but were being indexed by Google anyway. Twilight zone intensifies.

As we checked for any suspicious files that Jetpack Scan may have missed (no security tool detects 100% of threats), things got even stranger. WordPress Core and plugins were intact: no injected file or scripts on the database. A couple of outdated plugins didn’t have any security fix on them, WordPress was one version behind (5.6), and the latest update didn’t list any big security fixes. There was nothing suspicious at all. No usual suspects, no evidence of attacks; not yet, anyway. 

The next logical step is to check the access logs. Perhaps it could shed some light into this mystery. Would we find that we are facing a zero-day attack, or that we finally found a proof for the multiverse theory, and this website is only infected in Universe #1337? To the logs!

Code for a spam request
A request to this strange spam
Another strange spam request. Why does Bing like it?
It seems that Bing likes it too… But why?

As you would expect: nothing strange, other than a bunch of requests to those spam pages as you can see on the screenshots. And they were all returning a `200 OK`. So, the page existed somewhere in the time and space continuum, or … wait a second … do you see it now?

All those pages were pointing to the same location: `/?s=`, meaning that search engines (the problem was noticed by Google, but the requests are coming from Bing) were indexing search result pages. And why is that? The crawler doesn’t perform searches on the page, as far as we know, right?

The indexing paradox

The basics of how a search engine works are fairly straightforward if you are in the website business. There’s a robot (or automated script) that crawls web pages, indexes its content, performs some magic, and stores the queryable resources somewhere in the cloud.

With that in mind, we dug the logs a little bit more to see if any of those requests had any other clue, like a referrer, but no luck at all. All logged requests were coming from search engines. Luckily, Google Search Console had one of the referring pages in one of the logs. 

Google Search Console review of the page
Google’s Search Console tool gave some hints for us.

Now I think it’s time to switch our Twilight Zone hat for a CSI hat and dig up some website bones to put under the microscope.

For the trained eye, it’s easy to see that the referring page URL belonged to a compromised website; luckily, we have well-trained eyes! The `index.php` directory makes no sense and it was probably added to confuse the website owner. Next, it is followed by another random directory and a PHP file with a random name, which is probably a loader that is getting the final payload: the `cargese4/cca442201.htm`, which is also random. All of these are characteristics of a link-farm malware infection.

A quick search on Google to see what was indexed for the referring site confirmed that it was indeed infected and serving SEO spam for a while. The site is for a food company in India but offering deals on SUVs in Japan — yes, that’s spam.

Japanese search results for spam attack
Search query bringing spam in japanese on indian sites.

But, none of the results linked to our friend’s website, so I decided to find if other sites were affected by this same strange behavior.

In order to look for more victims of this spam attack we, for educational purposes only, used our  Google-fu knowledge to craft a search query which would return sites ending with .edu, which had `/?s=` in the URL, and the word « buy » in the title. And we got 22 results. Which is enough for our hunt.

Search results for spam pills
Using .edu and .gov sites to check spam infection filter out domains (like .com) that have been created only for link farming.

This is evidence that the reported site was not the only one affected; it seems to be a more widespread issue. We reflected on what could have made Google index those pages. How did the Googlebot reach them? Next step: backlink checkers.

Results from a backlink check
Results from a backlink check

There are several online tools that provide reports on backlinks to websites; the one we used in this research was Ahrefs, but other tools may reach the same results. Some of the malicious search pages are listed in the results, confirming we were on the right path.

Selecting one of those websites to check what was going on, we saw almost 5,000 spam comments, as you can see in the next screenshot (they should check out Jetpack Anti-spam). Every comment was linking to a website search page with spam in the query. 

Comment section linking to spam results
Comments linking to spam

Catching the white rabbit

As I mentioned before, search engine robots don’t perform queries on websites’ pages. But, if it finds a link to it, it’ll be followed. And if the page doesn’t tell the automated script that a particular page is not indexable, it’ll add it.

Example of injected spam
Ye olde injected spam

This is a clever method of « injecting » spam on a website for spamming search engine results and increasing site page rank through low-effort link farming.

Now that we understand the problem, how do we tell search engine bots to avoid following links to search pages (or just refuse to index them)? The best way would be to make a change to WordPress Core, which would help to protect the whole community (if you want to report a bug or want to contribute with the code, please join us).

In order to avoid some unnecessary rework, we checked the WordPress Core trac and found this issue that was solved on version 5.7 but unfortunately didn’t make it to the changelog as a security issue. 

I’ll quote the author, who described the issue better than I could (thank you abagtcs for the report):

Web spammers have started to abuse search features of those sites by passing in spam terms and hostnames in hopes of boosting the search rankings of the spammers’ sites.

The spammers place these links in open wikis, blog comments, forums, and other link farms, relying upon search engines crawling their links, and then visiting and indexing the resulting search results pages with spammy content.

This attack is surprisingly quite widespread, affecting many websites around the world. Though some CMS’ and sites powered by custom-written code may be vulnerable to this technique, based on preliminary investigation, it appears that — at least in the .edu space — the most targeted web platform by far is WordPress. » 

This isn’t surprising when more than 41% of the biggest sites on the web are WordPress sites.

Closing the case

There are some good lessons to be learned from this incident:

  1. The URL presented on Top Growing Pages is not well sanitized, so the spam URLs you see separated by emojis are actually directly clickable (hi Google friends, that’s on you ;) ); unaware users could click on them and access unwanted content.
  2. Some tweaks are needed by Google to avoid indexing clearly spammy pages. Based on the tool report, some clear pages were crawled and not indexed, while spam was added.
  3. Attackers will leverage even the smallest opening on your system and we must be vigilant at all times.
  4. Always listen to people and understand their problems. If we only checked the logs from our own tools, we wouldn’t be aware of this issue or be able to help to fix their site.
  5. Keep your software up to date. Always.

At Jetpack, we work hard to make sure your websites are protected from these types of vulnerabilities. To stay one step ahead of any new threats, check out Jetpack Scan, which includes security scanning and automated malware removal.

And a hat tip to Erin Casali for highlighting this issue and helping with the investigation.

J’aime chargement…
  • #Security
  • #Vulnerabilities
Avatar de Fioravante Souza

Written by

Fioravante Souza

Découvrez les avantages de Jetpack

Découvrez comment Jetpack peut vous aider à protéger, accélérer et développer votre site WordPress.

Découvrir les offres

Questions about this post? Ask in the support forum

Partager


Keep reading.

More from Jetpack 101, newest first.

Voir tous les articles

Jetpack 101 Mar 31, 2026

WordPress Image SEO: 12 Techniques to Rank Higher & Load Faster

Are images helping or hurting your rankings? What can you do about it? 12 realistic ways to optimize your image strategy for more high-quality traffic.

Avatar de Jen Swisher Jen Swisher 14 min de lecture

Jetpack 101 Mar 26, 2026

WordPress Site Redirecting to Spam? Here’s How to Fix a Hacked Site

Uncover hidden malware, remove malicious code, and stop spam redirects fast — before they damage your reputation. Secure your WordPress site.

Avatar de Jen Swisher Jen Swisher 12 min de lecture

Jetpack 101 Mar 24, 2026

WordPress Form with File Upload: How to Create One in 3 Steps

How to create a secure file upload form in WordPress — fast. Add drag-and-drop uploads in just 3 simple steps. Plus, the top tool to keep…

Avatar de Jen Swisher Jen Swisher 5 min de lecture

Gérez votre site WordPress, l’IA d’abord.

Free to start, and AI agents are free to connect. Money back within 14 days on yearly plans.

Commencer Obtenir Jetpack gratuitement

Extensions WordPress

  • Akismet Anti-spam↗ (s’ouvre dans un nouvel onglet)
  • Jetpack↗ (s’ouvre dans un nouvel onglet)
  • Jetpack Boost↗ (s’ouvre dans un nouvel onglet)
  • Jetpack CRM↗ (s’ouvre dans un nouvel onglet)
  • Jetpack Protect↗ (s’ouvre dans un nouvel onglet)
  • Jetpack Search↗ (s’ouvre dans un nouvel onglet)
  • Jetpack Social↗ (s’ouvre dans un nouvel onglet)
  • Jetpack VideoPress↗ (s’ouvre dans un nouvel onglet)
  • VaultPress Backup↗ (s’ouvre dans un nouvel onglet)
  • WP Super Cache↗ (s’ouvre dans un nouvel onglet)
  • Télécharger

IA

  • Jetpack AI
  • Skills
  • WordPress MCP

Partenaires

  • Programme partenaires
  • Hébergeurs recommandés
  • Pour les hébergeurs
  • Pour les agences
  • Pour les affiliés

Développeurs

  • Documentation↗ (s’ouvre dans un nouvel onglet)
  • Programme bêta
  • Jetpack sur GitHub↗ (s’ouvre dans un nouvel onglet)

Aide

  • Base de connaissances
  • Forums↗ (s’ouvre dans un nouvel onglet)
  • Avis et témoignages
  • Nous contacter
  • À propos de Jetpack
  • Presse
Sélectionner la langue Français
  • English
  • Deutsch
  • Español
  • Français
  • 日本語

© 2026 Automattic Inc. Tous droits réservés.

  • Conditions d’utilisation↗ (s’ouvre dans un nouvel onglet)
  • Politique de confidentialité↗ (s’ouvre dans un nouvel onglet)
  • RGPD

Créé avec soin par

Télécharger dans l’App Store Disponible sur Google Play
Chargement des commentaires…
  • Rebloguer
  • S'abonner Abonné
    Jetpack
    Rejoignez 53 352 autres abonnés

    Vous avez un compte WordPress.com ? Connectez-vous maintenant.

  • Jetpack
    Copier lien courtVoir la publication dans le Lecteur
    Gérer les abonnementsS’inscrireConnexion
    Signaler ce contenu
    Réduire cette barre
%d