The Daily Byte
Breaking
Welcome to The Daily Byte — real stories from across Pakistan.
Sunday, 29 November 2026 · Pakistan

The Daily Byte

Stories from Pakistan that deserve to be heard

CVE-2026-133555: Elixir db_connection Flaw Risks Code Run

By The Daily Byte ·28 Nov 2026 ·3 min read
Software developer writing code on a computer monitor at a desk

Elixir developers have been told to update a widely used database library after a flaw in it was used as the final step in the attack that breached the Hex.pm package registry.

The vulnerability, tracked as CVE-2026-133555, affects db_connection, the library that manages database connections for Elixir applications. It allows an attacker to execute arbitrary code through a forged database stream object. A fix is available in version 2.10.3, released on 24 November 2026.

The flaw was disclosed alongside the Hex.pm incident, in which an attacker ran commands on six of the registry's web servers on 23 November 2026. Hex.pm is the package registry for Elixir, Erlang and Gleam.

How the flaw works

The problem lies in how untrusted data is decoded. Some components decode input using Erlang's binary_to_term function without restricting which terms the result may contain. An attacker can exploit that by sending a forged DBConnection.Stream or DBConnection.PrepareStream struct.

When the forged stream is enumerated, the library calls its log option, which the attacker can set to a module, function and arguments tuple of their choosing. The library then runs that function, giving the attacker code execution.

The advisory is clear about one limit: the issue is not exploitable in db_connection alone. It needs a downstream component that decodes untrusted input without restricting the terms it accepts. Hex.pm was such a component, and the attacker chained its decoding flaw with this library flaw to run commands on its servers.

The vulnerability is classed as unsafe reflection, weakness CWE-470, and carries a CVSS v4.0 score of 8.9.

Which versions are affected

The flaw affects db_connection versions from 1.1.0 up to, but not including, 2.10.3. Anyone running an affected version should update to 2.10.3 or later.

In Elixir projects the update is a single command, mix deps.update db_connection, or an edit to mix.exs to require version 2.10.3, followed by a lockfile update and a test run. Where db_connection is only an indirect dependency, updating the package that depends on it, or adding an override, will pull in the fix.

Two related libraries were patched for the same class of flaw. Ash, the application framework, fixed CVE-2026-124283 in version 3.38.0, and the flop pagination library fixed CVE-2026-130411. Both shipped on 24 November 2026.

What developers should check

The wider lesson from the incident is about decoding untrusted data. Developers should search their own code and dependencies for uses of binary_to_term on input they do not control, and remember that the safe option does not block forged structs.

Hex.pm has told account holders to change their passwords and reset two-factor authentication, and to fetch packages only from the official registry until a new Hex client ships. It found no modified packages, no database changes and no persistence on its servers.

For Elixir teams, the immediate job is small: check the db_connection version in the lockfile and update it. The flaw only matters where untrusted terms reach the decoder, but the Hex.pm breach showed what happens when they do.