Hacked Website and GDPR: When and How to Report a Personal Data Breach
← Back to the blog

Hacked Website and GDPR: When and How to Report a Personal Data Breach

·Ivan Pantić

In short: If the attacker on a hacked site could access personal data (orders, form entries, user accounts), it is a personal data breach. The controller must report it to the supervisory authority (AZOP in Croatia) without undue delay and at the latest within 72 hours of becoming aware, unless the breach is unlikely to result in a risk. Where the risk is high, the affected people must be told as well. Every breach is documented internally.

When an owner discovers their WordPress site has been hacked, the first thoughts are technical: how to remove the malicious code, how to win back Google’s trust, how to stop the attacker coming back. Few people remember at that moment that a break-in can have a legal side too. If the attacker could reach your customers’ names, email addresses, phone numbers or home addresses, it is a personal data breach under the General Data Protection Regulation (GDPR), and clear deadlines apply.

In this article we explain, from the point of view of someone who cleans hacked sites every day, how to judge whether a break-in on your site is also a data breach, when it has to be reported to the supervisory authority (in Croatia that is the Personal Data Protection Agency, AZOP), what the report must contain and when the affected users must be told. This is not legal advice: for the actual decision, talk to your data protection officer or a lawyer. But the technical facts they need for that decision usually have to be gathered by you, and quickly.

What a personal data breach is

The GDPR defines a personal data breach broadly: a breach of security leading to the accidental or unlawful destruction, loss, alteration, unauthorised disclosure of, or access to, personal data. For website owners the last word matters most: access. It does not have to be proven that the attacker downloaded and published the data. It is enough that they had access to the system where the data lives and that you cannot rule it out.

In practice breaches fall into three types. A confidentiality breach means the data could have reached an unauthorised person. An integrity breach means the data could have been altered, for example if the attacker changed users’ email addresses or payment details. An availability breach means the data is temporarily or permanently unavailable, for example when the database was deleted or encrypted. A hacked WordPress site can cause all three at once.

Timeline from discovering a break-in to reporting it to the supervisory authority within 72 hours
The 72 hours run from the moment you are reasonably certain a breach happened, not from the break-in itself.

Step one: take stock of the data on your site

Before you assess the risk, you need to know what is actually on the site. Many owners honestly believe their site “has no data”, and then it turns out that a contact form plugin has been saving every message to the database for years. The most common places are:

  • User accounts in the wp_users table: usernames, email addresses and hashed passwords. For shops and membership sites that means thousands of customers.
  • Form entries: plugins such as WPForms, Gravity Forms, Contact Form 7 with the Flamingo add-on and similar store messages with name, email, phone and the content of the enquiry.
  • WooCommerce orders: first and last name, shipping and billing address, phone, email and purchase history.
  • Newsletter lists if the site keeps them locally and not only in an external service.
  • Comments with commenters’ email and IP addresses.
  • Logs and backups: server logs contain IP addresses, and database backups sitting on the same server contain everything above, often going back years.
List of places where a WordPress site stores personal data
Start with an inventory: forms, orders, users, newsletters and logs are the usual places with personal data.

Card data is normally not stored in the WordPress database because payments are handled by the bank or payment provider. But if the attacker injected a script into the checkout page that reads what the customer types, card details may have gone straight to them even though you never stored them. That is one of the highest-risk scenarios.

Could the attacker reach the data?

This is the question the technical analysis has to answer, as precisely as possible. Not every break-in is the same. Spam pages planted in a folder with a random name do not necessarily mean anyone read the database. On the other hand, a backdoor that allows arbitrary PHP code to run effectively means access to everything, because WordPress can always read the database.

What to check:

  • The kind of malicious code. Is there a web shell, a file manager or a database tool such as Adminer on the server that you did not install? Those tools exist precisely to read and export data.
  • Access logs. Requests to the data export in the admin area, to unusual PHP files, or unusually large server responses around the time of the break-in are serious indicators.
  • New or modified administrators. A WordPress administrator can see all orders and users and can export them.
  • The time window. How long did the attacker have access? The longer it was, the harder it is to claim the data was not seen.
Example of reviewing server logs for a database export or access to data
Logs show whether the attacker opened data exports or database tools. Without them, risk is hard to judge.

If the logs do not exist or the host has already deleted them, that usually means you cannot rule out access to the data. That is why logs are among the first things to preserve when a break-in is discovered.

The 72-hour deadline: when does it start?

The GDPR requires the controller to notify the supervisory authority without undue delay and, where feasible, no later than 72 hours after becoming aware of the breach. The key word is “aware”. The clock does not start when the attacker got in, but when you have established with a reasonable degree of certainty that a personal data breach has occurred.

That does not mean you can wait weeks for a detailed analysis to finish. Guidance from European supervisory authorities says that after the first alert the controller has a short period of investigation to establish whether a breach actually happened. As soon as that is clear, the clock is running. If you report after 72 hours, the report must explain the reasons for the delay.

It also matters that the report does not have to be submitted all at once and complete. If you do not yet know everything within the deadline, for example the exact number of affected users, you submit an initial report with what you know and complete it later. That is better than missing the deadline while waiting for perfect data.

When a report is not required

No report is needed if the breach is unlikely to result in a risk to the rights and freedoms of individuals. Practical examples that usually fall into this group:

  • the attacker planted spam pages, and the analysis shows they had no ability to run code and no access to the database,
  • only publicly available data was affected, such as the names of article authors that are published anyway,
  • the data was strongly encrypted and the key was not compromised.

Even when no report is needed, the decision must be reasoned and written down. That is exactly why the technical findings must be documented, not just passed on by word of mouth.

Risk assessment table for a personal data breach with low and high risk examples
The same break-in can be low or high risk depending on the type of data and whether it was protected.

What the report contains

The content of the report is set out in the Regulation itself. Supervisory authorities, including AZOP, publish forms and instructions on their websites, and the report must cover at least the following:

  1. A description of the nature of the breach: what happened, how it was discovered, the categories and approximate number of data subjects and the categories and approximate number of records.
  2. Contact details of the data protection officer or another person who can provide more information.
  3. The likely consequences for individuals, for example phishing emails to customers whose addresses leaked, or misuse of payment data.
  4. Measures taken and proposed: the cleanup, closing the hole, changing passwords, informing users and so on.
Elements a personal data breach notification must contain
The report describes what happened, who is affected, likely consequences and measures taken. It may be submitted in phases.

Be specific about the technical part, but keep it understandable. “Through a vulnerable form plugin the attacker uploaded a file that allowed code execution; the file was removed, the plugin updated and passwords changed” is more useful than a vague “the site was hacked and cleaned”. Vulnerable plugins are the most common way in, so it also helps to know how to check whether a WordPress plugin is safe.

When users must be told

If the breach is likely to result in a high risk to the rights and freedoms of individuals, the controller must also inform the data subjects without undue delay. A high risk typically exists when the leaked data enables identity theft or financial harm, when a large number of customers with addresses and phone numbers is involved, or when a malicious script could read card details.

The notice must be written in clear and plain language, without legal or technical jargon. Tell the customer what happened, which of their data may have been affected, what you have done and what they can do themselves, for example be careful with emails pretending to be from your shop or keep an eye on card transactions.

A notice is not needed if the data was protected so that it is unintelligible to an unauthorised person, if later measures ensure the high risk is no longer likely, or if notifying each person would involve disproportionate effort. In that last case a public announcement is made instead of individual messages.

The role of your host, agency and maintainer

The hosting company, the agency that maintains the site or an external newsletter service are usually processors under the GDPR. They do not report the breach to the authority on your behalf, but they must inform you without undue delay when they become aware of a breach. It is worth checking that you have a data processing agreement with them and who is named in it as the contact for security incidents. What else to look for in a host is in our guide on how to choose secure WordPress hosting.

In practice the host is often the first to notice the problem, for example mass mailing, and suspends the account. That moment may also be the moment you became aware. Keep the email you received, because it shows when the deadline started.

The internal breach register

Every breach, including one that is not reported to the authority, must be documented: the facts, the effects and the remedial action taken. The supervisory authority can ask for this register to check that you follow the rules. For a small business a simple table is enough, with columns for the date of discovery, a description, types of data, number of people affected, the risk assessment, the decision on reporting with reasons, and the measures taken.

Example entry in an internal register of personal data breaches
The internal register covers every breach, including those not reported to the authority.

When we clean a hacked site, besides removing the malicious code we try to answer the questions that matter for assessing a breach: how the attacker got in, when, whether they could run code, whether there was access to the admin area and the database, and whether there are traces of data being exported. A report with those answers gives the controller and their adviser a basis for the decision on reporting, and gives the authority a concrete description.

If you only suspect a break-in, the first step is still the same: a free outside check shows whether the problem is visible from outside, and a deep review of files and the database shows what happened inside. In urgent cases get in touch through the form or on +381 65 402 5000.

How to reduce the risk before anything happens

The best data breach is one where the attacker finds nothing worth taking. A few measures sharply reduce both the likelihood and the consequences:

  • Do not keep what you do not need. If contact form enquiries are sent by email anyway, turn off saving them to the database or delete them automatically after a while.
  • Remove old database copies from the server. Files like backup.sql in the site root are a common and easy prize.
  • Limit administrators. The fewer people can see every order, the fewer accounts an attacker can abuse, for example through fake security emails.
  • Turn on two-factor login for every account that can see customer data. How attackers get passwords is covered in our article on attacks on wp-login.php and XML-RPC.
  • Keep logs long enough and off the server, because without them a risk assessment becomes guesswork.
  • Have a procedure ready in advance: who decides on reporting, who writes the customer notice and where the register is kept.

None of this is expensive, and in a crisis it saves exactly what is scarcest at that moment: time.

FAQ

Do I have to report every hacked website?

No. A report is required when there has been a personal data breach that is likely to result in a risk to individuals. If the site does not process personal data, or the analysis shows the attacker could not reach it, a report is usually not needed, but the decision should be documented.

What if after 72 hours I still do not know how many users are affected?

Submit an initial report with an estimate and the information you have, then complete it when the analysis is done. The Regulation explicitly allows information to be provided in phases.

Is my hosting company obliged to report the breach for me?

As a rule, no. The host is a processor and must inform you; the report to the authority is made by the controller, meaning the site owner or the company whose customers they are.

Want to know whether your site is clean?

Run the free check: it takes less than a minute and needs no sign-up.

Run the check