Short version: a booking page I run was compromised within a day of going live, through a known bug I had already been warned about. The attackers walked off with a password that could send and read my email. Here is how it happened, what they did with it, and what I changed so it doesn’t happen the same way twice.
The setup
On November 4 I put a self-hosted booking page online for my consulting work, in a hurry: someone had asked that morning to book a call with me that same day, and I wanted a page they could use before the day was out. It runs Cal.com, an open-source scheduling app, in a container I build myself for an ARM server in the cloud. Like most apps of its kind it needs a few secrets to work: a database password, signing keys, a Google OAuth client so it can put bookings on my calendar, and an SMTP login so it can email confirmations.
That last one is where I made the mistake that mattered. For the SMTP login I used a Gmail app password for my own address, as a stopgap: the plan was to swap it for a separate sending account, or a narrower credential, once the page was up and the booking was done. An app password is a full-strength credential: it sends mail as you, and it also reads mail as you over IMAP. A booking tool only needs to send. I gave it the whole mailbox, and “temporary” lasted exactly as long as it took someone to find it.
The bug
The image I built was based on Cal.com’s docker repository at its v5.9.10 tag. That tag pins the application as a git submodule, and the pinned commit was older than Cal.com’s own v5.9.10 release. The practical difference: my image shipped Next.js 15.5.4, which carries the vulnerable React Server Components code behind CVE-2025-55182, better known as React2Shell (Next.js tracks its own side of it as CVE-2025-66478). It is an unauthenticated remote code execution bug in App Router deployments: one crafted request and the attacker runs code inside your server. The fixed Next.js is 15.5.7; the built image’s package manifest said 15.5.4. It is on CISA’s Known Exploited Vulnerabilities list, and it is being mass-exploited by automated crews scanning the whole internet.
I did not get unlucky. I got scanned, like everyone else, and I was the one with the hole.
What they did
- Nov 5, 00:12 UTC, about a day after go-live: a dropper landed in the container. It installed itself as a fake system service named
kworkerdand pulled an encrypted payload from a command-and-control host. - Nov 6, 08:19 UTC: the app’s environment was dumped to a file. Database URL, signing keys, the Google OAuth client secret, and that Gmail app password.
- Nov 6, 13:46 PST: an email titled “SMTP health check” went out from my own address to a throwaway mailbox. That is a credential checker: a script that logs in with a stolen password and mails itself proof that it works, so the credential can be sold or used later.
That “SMTP health check” sitting in my Sent folder was the tell. I was not looking for it; I noticed a message I had not written. About 30 hours passed between the recorded environment dump and the moment I pulled the page offline, and the exposure may have started earlier, when the container was first compromised.
Why my tooling didn’t save me
This is the part I most wanted to understand, because I have a nightly vulnerability scan across every container I run, and it did flag this. From the first night the booking page existed, the report had a row for CVE-2025-55182. Four things conspired to make that row invisible:
- The daily summary only called out findings that were new since the previous run. The React2Shell row was new exactly once, on a night when two malware false positives got the attention. After that it was part of “the standing count”.
- The summary folded every known-exploited bug into one number: “16 KEV on 10 containers”. An unauthenticated RCE on a public host read the same as a compression-library bug in a container with no network access, which I had consciously accepted while waiting for a vendor fix.
- Nobody, me included, triaged the findings one by one. “0 new” felt like “fine”.
- Neither the build nor the deploy checked anything. The image was pushed and started without a scan in the path.
A detector that fires once and then goes quiet is a detector you will learn to ignore. Mine was working exactly as designed, and the design was wrong.
Containment
Once the Sent mail was understood, the order was: take the page offline, cut the container from the network, block the command-and-control address at both the cloud host and my home router, snapshot the container for forensics, dump the database, then rotate. Every credential I identified in that environment was revoked or rotated: the Google OAuth client was deleted and replaced, the app password was revoked, the database and signing keys were regenerated, and the image was rebuilt with the patched Next.js and redeployed only after the rotation.
Then the longer tail: a new password and fresh recovery settings on the Google account, sign-out of every session, review of every account that can reset itself by emailing me, and a careful pass through the mailbox itself for anything that should not sit in a third party’s hands. Three people had booked through the page during those days; their names and email addresses were in the database the attackers could reach, and I am telling each of them directly.
What I still don’t know
Whether anyone actually read my mail. I have evidence of harvesting and of one SMTP test, which is itself a use of the credential; I cannot establish whether the mailbox was read beyond that. Google’s logs for this edition do not record app-password IMAP sign-ins. “I can’t find it” is not the same as “it did not happen”, so I am treating the whole window as if the mailbox was readable, because it was.
So I built an instrument: a deliberately vulnerable copy of the same booking app on a throwaway server, with a decoy mailbox and its own throwaway password, logging everything that touched it. Over four days of lure, five different toolkits stole the decoy mail password a combined 425 times. For 87 hours none of them logged in to the decoy mailbox or tried to send mail with it. I checked the instrument against itself: a test login of my own was recorded correctly, so that zero is a measured zero, not a blind one. Twenty minutes before I tore it down, one login from a network none of the earlier visitors had used authenticated over SMTP and sent nothing: a credential checker like the one that left a message in my own Sent folder, and evidence of checking, not of reading. It is a self-hosted decoy rather than a Gmail account, and none of it proves what happened to my own mailbox. What it shows is the shape of these kits: harvest, verify, move on. I am still treating my own window as exposed; I now have a reason, rather than a hope, to think it was not read.
What changed
- Least privilege for mail. No personal credential goes into a service again. The booking page now sends through a send-only identity with nothing readable behind it, and its calendar access runs as a dedicated account, not mine.
- A build gate. Every image is built once, scanned with a pinned, checksum-verified scanner, cross-checked against the CISA KEV feed, and fails closed if the scan is empty, partial, or stale. Only the scanned image gets pushed.
- A deploy gate. The deploy scripts for my public hosts run that check again before starting a container.
- Per-finding triage. The nightly report now puts every known-exploited bug in a bucket: fixable now, waiting on upstream, no fix yet, or accepted with an expiry date. Anything untriaged leads the report and turns the dashboard red until a human looks at it. Hosts that were never scanned say so instead of reading clean.
- Watching Sent. A mail in my own Sent folder that I did not write is now treated as a security signal: a poll flags it for review within minutes instead of leaving it to be noticed by accident.
The lessons, in the order I would want someone else to hear them
- Never hand an app a credential that can do more than the app needs, not even for a day. “It’s just for sending email, and I’ll swap it out later” is exactly how a full mailbox walks out the door. The narrow credential takes ten minutes to make; make it first.
- A version tag on a packaging repository is not the version of the software inside it. Check what actually got built.
- A finding you have seen before is still a finding. Summaries that count instead of list will hide the one that matters.
- Put the scanner in the path, not beside it. A report nobody has to act on is a report nobody acts on.
- Know what your own account looks like from the outside. The thing that caught this was a human reading their Sent folder.
- A same-day ask is not a reason to skip the gate. The page went up in hours because one person wanted to book that afternoon; the gate I skipped would have taken minutes. A calendar link in an email would have served them just as well that day.
I run a lot of infrastructure for a one-person shop, and most of it is automated. The automation did its job here; it reported the bug. What was missing was the part that refuses to let a known-exploited hole sit on a public host for four days without a human saying “yes, I accept that”, and the part of me that would have waited an hour before putting something new on the internet for a stranger. Both exist now.
Update, November 12: the scanner was right again
Since I wrote the lessons above, my nightly scan, now running against the vulnerability corpus a security friend had recommended, flagged a kernel bug rated critical, with a fix out from Ubuntu. It saw the bug on every host and filed each one into the fix queue with a seven-day deadline. That is exactly what it was built to do, and it was the wrong behaviour for this bug: a critical flaw on a host with public ports got the same calm seven-day row as a low-risk library on a box nobody can reach, and a fixed kernel that was installed but not yet booted was not a finding at all. One public server sat two days with the fix on disk and the old kernel running.
So lesson three has a sharper form. Counting findings hides the one that matters; severity without exposure hides it too. The scanner now has to know which of my hosts face the internet, and a critical finding on one of those is an alarm that reaches me, not a row that waits its turn. A kernel update is not done until the fixed kernel is the one running. And I took one more piece of that friend’s advice: an adversarial reviewer now reads every infrastructure change as it is built, not after it is live.
Thanks to the security professional who read the first draft and told me, in so many words, that it should never have been deployed, and to two friends in the guild who had suggested parts of this before I needed them. They were right, and the gates above are their arguments turned into code.
Comments are closed.