Hex, a package manager for Elixir and Erlang, recently faced a cybersecurity incident that resulted in unauthorized access to its web servers. The breach occurred on November 23 when attackers exploited a vulnerability in hex.pm to execute harmful commands. Swift action was taken, with the security flaw being rectified within 20 minutes of detection.
Details of the Cyberattack
The cyberattack transpired between 18:16 and 18:29 UTC, during which the perpetrators dispatched 69 malicious requests targeting six web servers. By 18:30, Hex had deployed updated versions of all hex.pm servers to counteract the attack, and a comprehensive firewall rule was implemented by 18:33 to block the malicious traffic.
Despite the breach, Hex reported no evidence of unauthorized alterations to packages, databases, or any sustained attacker access to their systems. However, there remains a possibility that sensitive database information, including email addresses, password hashes, API key hashes, session data, second-factor authentication details, and audit logs, might have been accessed.
Security Enhancements and Recommendations
In response to the breach, Hex promptly replaced storage, CDN, email, and database credentials, alongside session and access token keys, leading to a system-wide logout for all users and Hex clients. Users are advised to avoid downloading packages from third-party mirrors until the new Hex client features are available, which will include a registry signing system with key rotation capabilities.
Hex strongly recommends all users change their hex.pm passwords and reset their two-factor authentication settings. As a precautionary measure, users should be vigilant of any emails purporting to be from Hex, ensuring that links direct them to the genuine hex.pm site.
Broader Implications and Related Vulnerabilities
The breach was attributed to an unauthenticated deserialization vulnerability (CVE-2026-129514) which allowed remote code execution through a specially crafted request. This flaw also impacted the Ash Framework, which has since been patched to prevent similar security threats.
Additionally, vulnerabilities were identified and addressed in two other Elixir libraries: db_connection (CVE-2026-133555) and flop (CVE-2026-130411). These patches are crucial in safeguarding against potential code execution or SQL injection threats.
Related cyber incidents have been reported, highlighting a recurring theme of exploitations in various systems, underlining the importance of timely security updates and vigilance against potential vulnerabilities.
