Leonardo Borges Ramos

After Railway: every secret, where it is born and how to rotate it

Railway published its preliminary report on the attack, and Node.js fixed a Brotli flaw that allows code execution. The same week left a simple method to avoid being caught off guard next time.

Experience · · 5 min read

In 3 lines
  1. The attack on Railway ran from 10/20 at 13:58 UTC to 10/22 at 03:32 UTC. Up to 1.85% of workspaces, about 100,000, may have had variables read.
  2. On the same day, the 21st, Node.js fixed four high-severity flaws, including one in the Brotli decoder that can lead to remote code execution.
  3. What solves it is not reacting fast but having done it before: the list of every secret, a pinned runtime and what the server refuses.
The Node.js repository card on GitHub
nodejs/node no GitHub

The last issue ended with Railway deploys still stopped and a promise: to lay out where each secret is born and what it costs to rotate it. The week brought the end of the incident, Railway's report and, on the same day as the attack, a serious fix in Node.js. Both stories lead to the same conclusion.

What Railway said

The preliminary report came out on 10/23. Railway noticed the campaign on 10/20 and says the attack lasted from 10/20 at 13:58 UTC until 10/22 at 03:32 UTC, when it confirmed the intruder no longer had access. The target was AI provider keys. The intruder reached the Continuous integration: the machines that build and ship code on every change. environment and, from there, managed to decrypt part of the stored variables.

1.85%of workspaces may have had variables read
100kworkspaces, roughly
37hof paused builds, 10/21 09:28 to 10/22 22:49 UTC

Services that were already running never went down. What stopped was shipping new code. It came back plan by plan:

  1. 10/22 06:30 UTCPro and EnterpriseDeploys return for the larger paid plans.
  2. 10/22 21:08 UTCHobbyBuilds enabled for the Hobby plan, with a long queue.
  3. 10/22 22:49 UTCFree and TrialAll five plans deploying at close to normal speed.
  4. 10/23 19:18 UTCThe reportThe preliminary report is out, with the attack timeline.
  5. 10/23 22:06 UTCResolvedThe incident is closed. New signups remain paused.

Railway sent providers (GitHub, GitLab, Anthropic, OpenAI, OpenRouter and others) the list of keys that might have leaked, so they could be revoked at the source. It also replaced its build infrastructure: from the third generation, isolated but shared across customers, to the fourth, with one environment per customer. The final guidance stays the same: anyone with an account before 10/21 should rotate the keys stored there.

The other flaw of the week

On the same day, the 21st, Node.js shipped fixes for four high-severity flaws. The most serious is in the A compression format, like gzip. Modern browsers accept Brotli responses. decoder bundled with Node: a malformed compressed stream made the decoder write past the end of an internal buffer, which can lead to remote code execution (CVE-2026-111497).

The Node.js repository card on GitHub
The fixed versions are 22.23.4, 24.22.1 and 26.12.1. End-of-life versions get no fix.

The detail that catches many people: the decoder lives inside the Node binary. Updating npm packages changes nothing; the fix is upgrading Node itself. And the official advisory reminds that end-of-life versions are always affected when a security release comes out.

On the Develop ERP API, the response was twofold: the server now runs Node 24.22.1 in a container image pinned by The image's fingerprint: a code that changes if a single byte changes. Pinning by digest guarantees that what runs today is exactly what was tested., and request bodies compressed with Brotli are now refused, since no API client sends Brotli.

The method: the secrets list

Last issue's promise becomes a table. Every secret gets a row with four questions, answered before any incident:

01Where it is born

The dashboard or system that issues the key. That is where, and only where, it can be revoked.

02Who uses it

Every service, worker or app that reads the secret. A secret used by five systems means five deploys on rotation day.

03How to rotate

The steps: create the new one, ship it, test, revoke the old one and confirm it returns an error.

04How long it takes

From minutes (an API key used by a single service) to a scheduled window (a database password several systems share).

With the table ready, incident day becomes execution, not discovery. And it shows the problem before the attack: the secret that shows up in many rows is the most expensive to rotate, and that is the one to split first.

Five habits the week taught

  1. Rotate at the source

    Deleting the variable from the dashboard does not invalidate the stolen copy. The old key only dies when it is revoked where it was issued, and the test is that it returns an error.

  2. One key per service

    A shared key multiplies the damage and the rotation work. Each service gets its own, with the least access that does the job.

  3. Pinned runtime

    Exact Node version and an image pinned by digest. Upgrading becomes a reviewed, reversible change, not a surprise from the provider.

  4. Refuse what you do not use

    If the API does not receive Brotli, it does not need to accept Brotli. Every format accepted without need is an open door.

  5. Do not depend on one place

    Secrets and the way you deploy need to survive a platform outage. Railway also recommends taking databases off public network access.

What stays

The two stories of the week have the same shape: a problem that was not in the affected people's code. One was at the provider, the other inside the runtime. In both cases, whoever had the list up to date and the version pinned only had to execute. Everyone else had to find out, on the worst day, where each key lived.

What I take from it

Good security is a boring list made on a calm day. On incident day, you only execute what was already written down.

Where to see itRailway's preliminary reportThe Node.js security advisory

More from the journal · FindDraw the idea to understand the idea

All issues →

Quer conversar sobre isso?