What's the future of SaaS after the Railway attack?
You’ve probably all heard about the Railway hack a few days ago.
Context from the official report:
1. How they got in
The hackers had access to enormous computing resources and were using abliterated models.
** Abliteration is the process of removing built-in ethical restrictions and safety censorship from large language models. Unlike a normal jailbreak, these models are essentially stripped of their internal “morality” mechanisms.
The AI autonomously scanned Railway’s cloud architecture, identified logical vulnerabilities in its data-storage protections, and rapidly moved deeper into the infra.
2. What they actually did once inside
After breaching the perimeter, the hackers targeted the centralized storage containing customers’ encrypted environment variables.
– They gained access to storage buckets.
– Intercepted the platform’s own cryptographic keys, which allowed them to decrypt a significant share of users’ secrets (their env variables) in real time.
– Then automated parsers started searching through the data for private crypto keys, GitHub keys, and credentials for AI providers.
3. Target? LLMjacking
This is probably the most interesting part.
Stealing crypto was basically a “nice bonus.”
The real target was access keys to commercial AI providers like OpenAI, Anthropic, and others – which could then be used for distillation attacks.
The hackers were hunting for expensive API keys tied to high-limit or enterprise accounts.
With free access to advanced paid models attackers can hit them with millions of queries and extract their knowledge and reasoning patterns.
Those outputs can then be used to train their own unauthorized models.
So, basically: stealing intellectual property while making someone else pay for the compute.
My thoughts on what to expect:
– Mass exploitation of startups. Young tech companies, SaaS, and indie devs move extremely fast and rely heavily on platforms like Railway, Vercel, or Render.
– Open source = bigger attack surface. Modified AI models can continuously scan billions of lines of public GitHub code, looking for forgotten vulnerabilities.
– As the Railway case shows, hackers may no longer be targeting only money. AI itself becomes an asset worth stealing. That means intellectual property is now firmly inside the risk zone – especially for large companies that have invested billions into developing their models.
– Identity cloning and ultra-realistic deepfakes. Don’t believe everything you read or hear
We’re entering a brave new world. Time to get the USB drives out and prepare virtual cards for every online purchase?
What are your thoughts, Reddit?
Comments Section
Think it just means real developers who understand backend and security will have plenty of job security in the long run.
> Young tech companies, SaaS, and indie devs move extremely fast and rely heavily on platforms like Railway, Vercel, or Render.
Or they could just not do that..
If you mean to suggest using traditional hyperscalers like AWS and Scaleway… a suggestion like that to someone who’s an indie dev in practice means way longer project setup times, needing to own and maintain their infrastructure configuration (k8s configs for instance), and foregoing a lot of conveniences that make solo development possible (and bearable) in the first place.
And even if they do move, what would make us believe that their own separately configured infrastructure would be more resilient against attacks than the one they are currently renting?
I meant self-hosting. You don't need anything cloud-like until you got 1000s of customers. You pay 100 bucks for a bare metal server and install on it everything that you need. The only cloud provider you might need from the start is some sort of object storage, if you need TBs of space right away. That's the one thing I would not want to self-host.
Longer development time
Or
Compromised infrastructure and data
Seems like a really hard decision. /s
AWS has tooling in place to catch/prevent malicious actors. That doesn’t mean it isn’t possible to be compromised, but I would trust AWS over most other providers.
If you are building a SaaS and are not investing real time and effort into your infrastructure then this and many other bad things can and generally do happen.
So Railway and their engineers couldn’t secure their stuff, but a vibe-coding SaaS founder would do a better job configuring infrastructure from scratch on AWS?
Yes. At least they would be better prepared to protect themselves. Railway clearly wasn’t able to. At least with AWS you have access to everything you would need.
The idea of vibe coding anything and expecting it to run anywhere and be safe without effort is ignorance.
But we don’t have security engineers.
Maybe if you are running a SaaS where you have to work with sensitive information, more time should be spent on how that information is protected.
Even vibe coding this stuff, it’s a simple question to AI. “Will any of my customers data involve PII? What do I need to do legally to protect that data for each country my Customers are in?”
AI will at least steer you in the right direction. At that point if its advice is ignored then that’s on you.
When you connect to railway or any other server you add a key. Each server needs a key to communicate. No matter what I do on my side. The environment I am connecting to Railway gave the key to someone else. That gave them access to a piece of my environment. Great thing railway only handled a piece of the job. But the piece wrote to databases. So I had to rotate every call that wrote to a particular database. I totally understand what you’re saying I need 5-6 different keys. Instead of one. Railway should have its own key and any other services connecting. In a test and dev environment that’s a nightmare. PROD Yes Many of these projects are in dev.
99.9% of startups don't need K8s
How does your deploy look like without k8s? You git pull and docker compose up on a VM? Or something else?
IAC is there and LLMs are good at building Terraform scripts
Ye, they are, but are you able to then read and understand those scripts? Do you know every single thing about k8s configuration? And if not, then your system is only as secure as the agent you used to set things up.
If I don't know something then I check documentation. You have to choose between trusting third party or your team. In most cases the third party is running on AWS or similar cloud provider so you're eliminating one blackbox from the architecture.
Railway is very cheap. Cheaper than hetzner (coolify is free which is good). Thats one reason why i use it, it cost $5 to host two websites. If i want to do the same on hetzner its going to cost me $7-10 per project. I use hetzner for a chatting website like discord because u can choose the location of the server and its better than railway for that use.
I went to see their pricing and I was surprised that it is actually extremely competitive. Almost too good to be true tbh.
Cheaper than Hetzner is… very impressive
It really just drives home the importance of defense in depth. Developers and architects need to understand the trust boundaries in their systems and design to reduce blast radius. Assume any component of the stack, including the hosting provider, can be compromised. Knowing what an attacker can access once that happens is important.
Least privilege, isolated environments, scoped credentials, monitoring, and the ability to quickly rotate or revoke credentials are fundamental security controls. Railway's own report describes how its internal compartmentalization helped limit the scope of the incident. That's defense in depth doing what it was intended to do, even when another layer failed.
The encrypted secrets were accessed and decrypted so I am curious how we can prevent my apps hosted there (apart from quickly rotating)
This sounds like a state sponsored attack
Not sure, but my logs on gemini key show various languages hitting distillation prompts.
As someone who get gemini key exposed, they used models across Argon, even Gemini Lite for distillation. They used Fable and Opus 5.5 over openrouter as well. Over all cost before cap $70, so not that bad.
Can tell you, that it’s shit feeling waking up to spend caps email, but super grateful for having them in first place.
Pretty pissed about the fact I never received email from railway about exposure. Anyways had to migrate everything from it. Closed the shop on their side.
I went through something similar. Mine was a Gemini key too, and the spend cap stopped it. It was the spend-cap alert that made me look, with Railway's email following soon after.
I did get Railway's first email a day before, but it came in the middle of the night and looked like any other mail that got buried under my morning notifications, so I only saw it later. Might be worth checking spam if you never got one.
That said, I do think Railway should have owned it more and made those alerts a lot clearer.
Try contacting GCP. They might not charge you for breach.
Beyond rotating, the useful work is shrinking what a leaked env var can do next time:
- **Scope keys down.** Stripe restricted keys with only the permissions your app uses, a separate database user for the app instead of the owner account, and different keys for prod and staging.
- **Hard spend caps on every AI and API key.** The person above with the Gemini key lost $70 because a cap stopped it. Without one, that's an open-ended bill.
- **Lock the database to your network** if your provider supports it (private networking or an IP allowlist), so a stolen connection string on its own isn't enough.
- **Prefer short-lived credentials** where you can, e.g. OIDC for deploys to AWS/GCP instead of long-lived access keys sitting in env vars.
- **After rotating, test that each old key is actually rejected.** "Rotated but the old one still works" is more common than it should be.
- **Turn on usage alerts**, so you find out about abuse within hours rather than from the invoice.
None of that stops a host getting breached, but it limits what the attacker walks away with.
this is wild. i keep thinking about how railway is not even a huge target in the grand scheme of things, but the attackers still went for it because the real prize was the api keys sitting in those env vars. like the hack itself was just the delivery mechanism, the actual heist was stealing access to other AIs
the distillation angle is what gets me. you spend millions training a model and then someone just extracts its capabilities through your own api endpoint while you foot the compute bill. that is a nightmare scenario for any AI company
i wonder how long until we see startups offering "env variable insurance" or something. feels like the whole model of storing secrets in platform dashboards needs a rethink, but i have zero clue what the alternative even looks like right now
They went for it because it was vulnerable. Let's not get that confused.
attackers are going after everyone, they dont' care who the target is. Railway just happens to have vulnerabilities.
Imo it’s also breaking the VC cycle: why invest millions into something if it can later be stolen / copied
Just host you saas yourself, y'all just got a few users in the beginning and if you grow let someone with the knowledge set up an infra for you. If you don't know how, learn it while Claude builds your app
What if they use DigitalOcean or Hetzner + Coolify, or Coolify Cloud, and put Coolify and the Admin side behind a Cloudflare Tunnel?
I think what’s more likely is that agents who aren’t federated on a universal system won’t get to participate on the internet soon, they’ll be shut down by threat hunters or walled off somehow. That will obviously have weak spots as anything but would solve a lot of issues even if centralizing agent access
"Young tech companies, SaaS, and indie devs move extremely fast and rely heavily on platforms like Railway, Vercel, or Render."
Well maybe they shouldn't rely on those companies and instead just manage the VPS & dedicated servers themselves, which is not too difficult
imo this pushes more teams toward ephemeral credentials instead of static env vars sitting in a dashboard. if a secret is only valid for an hour, dumping the storage bucket doesnt give the attacker much runway.
Well, to be honest, the vast majority of serious SaaS companies do not stick to Railway. I tried my best to use it at one point, but nothing beats K8s...
Comment removed by moderator
Yep. Though I will say I run my K8s cluster for $500/mo, so it isn't as though it has to be super duper expensive. For a good size SAAS in the $5K+ mrr range that just becomes a part of the margin.
"This is the most interesting part". Funny chatgpt tells me those exact words all the time.
Just don’t use Railway, ever again. Problem solved
You seriously think that the railway incident has any impact on the future of SaaS as a whole? I don’t even think a single profitable SaaS is hosted on Railway….
Just coming to say this -- A LOT of sites were affected, not just Railway.
The CRA (Canada Revenue Agency) had a breach -- if gov't sites can get breached and they have a lot more money than Railway does, you can't fault Railway.
Take sensible steps to protect yourself.
I've made some architecture changes and routinely rotate my API keys anyways (it is a pain, but better safe than sorry).
Such ignorance. You can’t wrap your head around the idea that this is just the beginning. Hacks will become even harder to stop in the future.
you forgot one thing though. If AI can hack a SaaS, the same AI can also make the SaaS secure against these hacks
You won’t be able to defend yourself against an army of agents tho.
if every weak point that an agent can find is closed, then it won’t matter if you’re attacked with 1 or 10.000 agents. Also, nobody attacks your SaaS with 10 MAU respectfully
I can tell you aren’t an engineer. You see this as basic when it’s much more complex orchestration. You can’t patch every piece of your stack yourself. You going to manage your own programming language, framework, application, infrastructure, etc? Every one of those will become attack vectors. Php2shell was just v0.0.1. This is what I’m taking about.
I have a B.Sc in Computer Science, Graduated one of the best of class and have multiple years of professional experience, what do you have?
I think you missed the part about this is just the beginning and the agents would be looking for different things, finding novel exploits in real time that you couldn’t stop. It wouldn’t be as basic as a DDOS.
exactly. but not just the attackers lmao.
Isn't this somehow related to the PHP vulnerability that got public just before?
Separate. Coincidentally timed.
Looks like there's a new AI model finding bugs that we're not aware of?
Comment removed by moderator
Your comment was removed. Links in comments require to gain karma first in r/SaaS. Earn sub karma by commenting helpfully first.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.