Help for owners
My Drupal site was hacked and I think I missed an update
Short answer
Drupal publishes security advisories so that sites can be patched, and its own guidance warns that problems on unsupported versions may be disclosed in public. A site that missed an update is exposed to a known weakness. Do not delete anything: tell your host, secure a copy, and have the site cleaned and patched.
Does this sound like your situation?
- My pages show text or links I did not write.
- Visitors or Google are sent to other sites.
- My host or a scanner says my site is infected or has been blocked.
- There are administrator accounts I do not recognise.
- The site was not updated for a long time before this happened.
Why does this happen?
Fixes are published, and so are the weaknesses
The Drupal Security Team announces problems and fixes as Security Advisories. A site that is not updated after an advisory stays exposed to a weakness that is now publicly described.
Confirmed by drupal.org
End of life removes the fixes
Drupal.org says that after end of life for Drupal 7, security advisories stop and security issues may be disclosed in public, with zero-day vulnerabilities possible. A site that stays on an unsupported version has no more official fixes to apply.
Confirmed by drupal.org
Extra modules widen the surface
Contributed modules, themes and custom code are patched separately from core. An unused module that is still installed can still be attacked.
Attackers may leave a way back in
A site that is only patched, but not cleaned, can be re-infected. Hidden accounts, changed files and backdoors survive an update.
What can I do about it today?
- Do not delete files or the databaseDeleting makes it hard to tell what happened and can lose your content. Leave the site as it is until a copy exists.
- Tell your host straight awayAsk them to take a copy of the files and database, and ask whether they can put up a maintenance page. Do this by their support channel, not by guessing.
- Change passwords from a clean deviceChange the passwords of your host account, email and any site administrator, using a computer you know is not infected. Do not reuse old ones.
- Read Drupal's own guidanceDrupal's security documentation includes a guide titled My site was defaced (hacked). Now what? Read it with whoever helps you.
- Warn customers only if their data may be affectedCheck what the site stores before you write to anyone. Whether you must notify people is a legal question I cannot answer; ask a qualified adviser.
- Write down what you sawDate, pages, messages, and any account you did not create. It shortens the investigation.
When should I bring someone in?
- The site holds customer data, orders or payments.
- You were cleaned once and it came back.
- Your host has suspended the site.
How do I handle it?
- Preserve, then containA full copy is taken first, then the site is put behind a maintenance page so it stops harming visitors.
- Find what changedI compare the files against a clean copy of the same Drupal version and its modules, and list accounts, scheduled jobs and unexpected files.
- Clean and patch togetherThe infected files are replaced from clean sources, unknown accounts are removed and every credential is replaced, then core and modules are brought up to date.
- Close the original gapIf the version is no longer supported, I say so plainly and set out the migration route, because patching alone will not keep it safe.
- Put a routine in placeAdvisories are watched and updates applied on a schedule, with a backup before each.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
Is the update enough to fix a hacked site?
No. An update closes the hole, but anything the attacker left behind stays. A hacked site needs cleaning as well as patching.
Can I just restore an old backup?
Only if the backup is from before the break-in and the hole is closed straight afterwards. Otherwise the same weakness lets the attacker back in.
Where do I find out about Drupal security problems?
Drupal's security documentation points to the Security Advisories published by the Drupal Security Team.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.