Over 10 million customers confirmed, up to 20 million claimed by attacker
Endesa, Spain's largest energy provider and a subsidiary of the Enel Group, has acknowledged a significant data breach affecting its customers. The company detected unauthorized access to one of its commercial platforms, resulting in the exposure of sensitive customer information. Exposed data includes names, contact details, national ID numbers (DNI), and, critically, bank account IBANs. While Endesa has sought to downplay the risk, a threat actor has surfaced on a prominent cybercrime forum claiming to have exfiltrated a 1.05 terabyte SQL database containing records for over 20 million individuals. This massive discrepancy between the corporate disclosure and the cybercriminal's claim suggests the breach could be far more severe than initially reported, placing millions of individuals at high risk of financial fraud and identity theft.
The incident involves two conflicting narratives. Endesa's official statement confirms a breach of its Energía XXI commercial platform, admitting that attackers accessed and potentially exfiltrated customer identification, contact, and contract data. Most concerning is the admission that bank account IBANs were part of the exposed dataset. The company has asserted that account passwords were not compromised.
In stark contrast, a threat actor using the alias "Spain" has posted the data for sale on a hacking forum. The actor claims the stolen dataset is a 1.05 TB SQL database containing "fresh data" on over 20 million people, which they are offering to a single buyer. This suggests a complete compromise of a major customer database, not just limited access.
Endesa has notified Spain's Data Protection Agency (AEPD) and is urging customers to be cautious of phishing emails, smishing attacks, and other fraudulent communications that may leverage the stolen data.
The exact vector of the breach has not been disclosed, but the nature of the stolen data (a full SQL database) points towards several likely scenarios:
T1190) on the public-facing commercial platform could have allowed the attacker to bypass authentication and dump the entire backend database.Once access was gained, the attacker likely used automated tools to exfiltrate the large volume of data (T1020) over an extended period to avoid detection, before putting it up for sale on the dark web.
The potential impact of this breach is massive, especially if the hacker's claims are accurate:
SELECT * commands or queries that export large numbers of rows from customer data tables.D3-ACH: Application Configuration Hardening.D3-FE: File Encryption) can add another layer of protection.Deploying a Web Application Firewall (WAF) to inspect incoming traffic can detect and block common web attacks like SQL Injection.
Mapped D3FEND Techniques:
Encrypting sensitive customer data like DNI and IBAN numbers at rest within the database provides a crucial last line of defense.
Implement database activity monitoring to audit all queries and alert on anomalous activity, such as unusually large data exports.
Mapped D3FEND Techniques:
Use egress filtering to block outbound traffic from database servers to the internet, preventing direct data exfiltration.
Mapped D3FEND Techniques:
To specifically counter the threat of large-scale database exfiltration, organizations like Endesa must implement User Data Transfer Analysis. This involves deploying tools that monitor and analyze the volume and flow of data leaving critical database servers. Establish a baseline for normal data export operations (e.g., routine reports). Configure alerts to trigger when data transfer volumes drastically exceed this baseline, especially if the destination is an external or unauthorized IP address. This technique moves beyond simple firewall rules to provide behavioral detection, which is essential for catching a stealthy attacker who has already gained internal access and is attempting to steal the crown jewels, as was likely the case in the Endesa breach.
Given that the breach likely originated from the commercial platform, rigorous application hardening is a critical countermeasure. This includes conducting regular, in-depth security code reviews and dynamic application security testing (DAST) to identify and remediate vulnerabilities like SQL injection. For a platform like Energía XXI, this means ensuring all user-supplied input is strictly validated and parameterized queries are used to interact with the SQL database. Furthermore, hardening involves removing unnecessary features, setting secure configuration flags, and ensuring error messages do not leak sensitive system information. This proactive measure aims to eliminate the initial entry point that attackers exploit to gain access to backend data.
The principle of least privilege must be strictly enforced for all accounts that can access the customer database. The service account used by the web application should have permissions only to perform its necessary functions (e.g., read/write individual customer records), not to dump the entire database. Similarly, database administrator accounts should be limited in number and their usage heavily monitored. By restricting permissions, you ensure that even if an attacker compromises a service or user account, the potential damage is contained. They might be able to access one record, but not exfiltrate the data of 20 million customers in one go.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
Help others stay informed about cybersecurity threats