Spanish Energy Giant Endesa Hit by Massive Data Breach, 20M Records Allegedly For Sale

Endesa Confirms Data Breach; Hacker Claims to Hold Data of 20 Million People

HIGH
January 14, 2026
5m read
Data BreachCyberattackIndustrial Control Systems

Impact Scope

People Affected

Over 10 million customers confirmed, up to 20 million claimed by attacker

Industries Affected

EnergyCritical Infrastructure

Geographic Impact

SpainPortugal (national)

Related Entities

Organizations

Spain's Data Protection Agency (AEPD)

Products & Tech

Energía XXI

Other

EndesaEnel Group

Full Report

Executive Summary

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.

Threat Overview

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.

Technical Analysis

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:

  1. Web Application Vulnerability: A flaw such as SQL Injection (T1190) on the public-facing commercial platform could have allowed the attacker to bypass authentication and dump the entire backend database.
  2. Compromised Credentials: Stolen credentials for a developer or database administrator could have provided direct access to the database.
  3. Misconfigured Cloud Storage: The SQL database could have been stored in a misconfigured cloud bucket or server, left publicly accessible without proper authentication.

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.

Impact Assessment

The potential impact of this breach is massive, especially if the hacker's claims are accurate:

  • Financial Fraud: The exposure of IBANs alongside names and national ID numbers creates a significant risk of fraudulent bank transfers and direct debit scams.
  • Widespread Phishing: Attackers can use the stolen data to craft highly convincing and personalized phishing campaigns, targeting millions of Endesa customers to steal further information or deploy malware.
  • Identity Theft: With names, contact details, and DNI numbers, criminals have the core components needed to perpetrate identity theft.
  • Regulatory Fines: Endesa faces the prospect of substantial fines under GDPR for failing to adequately protect customer data, especially sensitive financial information.
  • Loss of Customer Trust: As a provider of critical infrastructure, this breach severely undermines public trust in Endesa's ability to secure its systems and customer data.

Cyber Observables for Detection

  • Database Activity Monitoring: Monitor for unusual, large-scale query activity, especially SELECT * commands or queries that export large numbers of rows from customer data tables.
  • Network Egress Traffic: Look for anomalous large data transfers from database servers to unknown external IP addresses. This is a key indicator of data exfiltration.
  • Log Analysis: Scrutinize web server and application logs for signs of SQL injection attacks, authentication failures, or unauthorized access from unusual geolocations.

Detection & Response

  • Data Loss Prevention (DLP): DLP solutions can be configured to detect and block the exfiltration of structured data formats like DNI numbers and IBANs.
  • User and Entity Behavior Analytics (UEBA): UEBA systems can help detect compromised accounts by flagging deviations from normal user behavior, such as a developer account suddenly accessing and downloading an entire customer database.
  • Threat Intelligence: Monitor dark web forums and marketplaces for mentions of your company or stolen data. Early detection of a data sale can provide a crucial head start in the incident response process.

Mitigation

  1. Web Application Security: Regularly scan and penetration test all public-facing applications for vulnerabilities like SQL injection and enforce secure coding practices. This aligns with D3FEND's D3-ACH: Application Configuration Hardening.
  2. Data Encryption: Sensitive data, both at rest and in transit, must be encrypted. While this wouldn't have stopped a breach via a valid application query, encrypting PII within the database itself (D3-FE: File Encryption) can add another layer of protection.
  3. Access Control: Implement the principle of least privilege for all accounts, especially those with access to sensitive databases. Database access should be tightly restricted to a small number of authorized personnel and applications.
  4. Customer Communication: Proactively and transparently communicate with affected customers, providing clear guidance on how to protect themselves and how to report suspicious activity.

Timeline of Events

1
January 12, 2026
Endesa begins notifying customers and authorities of a data breach.
2
January 13, 2026
A threat actor posts a database allegedly stolen from Endesa for sale on a cybercrime forum.
3
January 14, 2026
This article was published

MITRE ATT&CK Mitigations

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.

Mapped D3FEND Techniques:

Audit

M1047enterprise

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:

D3FEND Defensive Countermeasures

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.

Article Author

Jason Gomes

Jason Gomes

• Cybersecurity Practitioner

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.

Threat Intelligence & AnalysisSecurity Orchestration (SOAR/XSOAR)Incident Response & Digital ForensicsSecurity Operations Center (SOC)SIEM & Security AnalyticsCyber Fusion & Threat SharingSecurity Automation & IntegrationManaged Detection & Response (MDR)

Tags

Data BreachEndesaSpainPIIEnergy SectorCybercrimeIBAN

📢 Share This Article

Help others stay informed about cybersecurity threats

Continue Reading