CybersecurityNovember 25, 20264 min read

Hex.pm patched a long-hidden RCE after six registry servers were hit

At first glance this looks like another server-side bug getting patched fast. The unusual part is that the flaw had sat in Hex.pm’s code since 2016 and was then used to run OS commands on six production servers.

A package registry getting patched after an attack can sound routine. Server bug, fix goes out, service moves on.

The part that changes the story is how old this one was and where it lived. An attacker used a CVSS 10.0 remote code execution flaw in Hex.pm to run operating system commands on six production servers on Monday, and that bug had been sitting in the registry’s code since February 2016.

That is the kind of detail that should make people pause.

Hex.pm is the package registry Elixir and Erlang developers use to fetch dependencies. If you build software in those ecosystems, this is part of the plumbing. Most people do not think about it much, the same way you do not think about the pipes behind a wall until one bursts.

Why a registry bug is different from an ordinary server flaw

Remote code execution means an attacker can make a server run commands chosen by the attacker. Not just crash something. Not just read a page they should not see. Run commands on the underlying system.

That is usually one of the worst classes of bug because it can become almost anything else after that. Data access, malware, persistence, tampering, or a jump into other systems if the setup allows it.

When the target is a package registry, the stakes go up because it is trusted infrastructure. Developers and automated build systems pull code from it every day. It is a bit like a central warehouse in a supply chain: if someone gets inside the warehouse systems, you start asking whether the inventory, records, and shipments stayed clean.

To be clear, the known facts here are narrow. An attacker ran operating system commands on six production servers. The maintainers had every server on a patched build within about 15 minutes of the first malicious request.

That speed matters.

Fast patching does not erase the seriousness of the flaw, but it does limit how long the attacker had to work with it. In incidents like this, minutes can be the difference between a contained break-in and a much larger mess.

The notable part is not only the score, it is the age

A CVSS 10.0 score tells you the bug was rated as severe as it gets on that scale. But the age of the flaw is the detail I keep coming back to.

Since February 2016 means this code path lived for years before being used in a known attack. That is normal in an uncomfortable way. Plenty of dangerous bugs are not new. They are just unnoticed, or they sit in low-visibility corners until someone figures out how to turn them into a reliable exploit.

That is one reason software security is never just about patching the latest headline bug. It is also about reducing trust, isolating systems, logging well, and assuming that some old flaw you do not know about may still be there.

Especially in shared infrastructure.

For anyone outside security, think of it like an old spare key hidden somewhere around a building. Everyone forgets it exists. Years later, someone finds it and walks in. The problem is not only the person who used it. The problem is also that the building was counting on nobody ever noticing.

What developers and teams should do now

If you depend on Hex.pm, this is a good moment to review your own exposure calmly and practically.

  • Check any advisories or notices from the service maintainers and follow their guidance.
  • Review build and deployment logs from Monday onward for unusual package pulls, failed integrity checks, or odd changes in automation.
  • Rebuild sensitive projects from known-good inputs if your risk tolerance or environment requires extra assurance.
  • Make sure your systems verify package integrity wherever your tooling supports it.
  • Limit what build servers and dependency-fetching systems can reach on the network. A compromise should not turn one service into a bridge to everything else.
  • Rotate credentials tied to build and publishing workflows if there is any sign they may have been exposed elsewhere in your environment.
  • Keep an inventory of external services your software supply chain depends on, not just code you write yourself.

For maintainers of any package service, the lesson is equally plain: patch speed is good, but architecture still has to assume a bad day will happen. Segment systems. Reduce privileges. Keep audit trails that help answer the ugly questions fast.

A registry is high-trust infrastructure. Treat it that way even when everything looks quiet.

The clear read from this incident is simple: a very old bug in a very central service was still dangerous enough to let an attacker run commands on production servers. The response window was fast, which is good news. But the bigger reminder is that software supply chain risk often hides in the boring, long-lived parts of the stack, not only in brand-new code.