How to Secure API Keys After the React2Keys and easyDNS Leaks
If a key may have leaked, patch the app and rotate every secret that sat on that server. Rotation is the step people skip, and it matters most, because stolen keys keep working after a patch. Then turn on GitHub secret scanning with push protection, and rotate any key you stored with a third-party vendor.
Two incidents in November 2026 show how secrets walk out the door. One was an AI-driven campaign that stole keys from web servers. The other was a domain registrar that got breached, taking its customers’ AWS keys with it.
Neither report mentions Uganda or East Africa, and I have no local victim numbers. But the tools are free to point at anyone, so if you ship Next.js sites or APIs for clients from Kampala or Nairobi, this is worth an afternoon.
What was the React2Keys campaign?
BleepingComputer, citing CloudSEK research (30 November 2026), reported an AI-automated credential-theft campaign. It exploited React2Shell (CVE-2025-55182), a critical unauthenticated remote code execution flaw in React Server Components. Servers hosting Next.js apps were affected.
CloudSEK says it ran for ten days, 9 to 19 November. More than 50,000 credentials were stolen from at least 19,000 hosts, affecting about 400 organisations.
How did the attackers pick targets? They polled six public Certificate Transparency logs every three minutes to spot newly issued TLS certificates, then fingerprinted those domains for Next.js. About 3% of unique domains were flagged as likely Next.js. So the targeting did not depend on how big or famous you are. A new HTTPS certificate is public.
The loot list is long:
- AWS keys, Azure managed-identity tokens and Google Cloud service-account keys
- Anthropic, OpenAI and Gemini API keys, plus Claude Code OAuth tokens
- GitHub tokens
- PostgreSQL, Redis and MongoDB credentials
- Crypto exchange and wallet keys
The attackers tested the AI keys and ran AI requests billed to victims. They also planted an SSH key for persistence and used stolen cloud credentials to expand their scanning.
What happened in the easyDNS breach?
BleepingComputer reported that attackers got into the Canadian registrar easyDNS on 25 November through an internal monitoring system. They ran commands on several servers, copied customer database tables and read AWS API keys.
easyDNS spotted it on 26 November, after customers reported unauthorised use of their AWS keys. About 550 customers were affected, and on 27 November it notified about 100,000 active users. Exposed data included contact details, limited billing data (last 4 card digits, expiry date, postal code) and unsalted SHA256 email password hashes for 28,941 mailboxes. easyDNS says full card numbers, its account passwords and its REST API keys were not lost.
Its advice to customers: rotate the AWS keys stored in its control panel and monitor your AWS account.
My reading, and this is my inference rather than the article’s claim: a key you hand to a vendor is only as safe as that vendor. Think about every dashboard where you pasted an AWS key so “the integration works”.
What do I do if I think a key has leaked?
Patch and rotate. Patching alone is not the fix, because CloudSEK warns that stolen credentials and planted SSH keys can remain usable after patching. Do these in one sitting:
- Patch React and Next.js against CVE-2025-55182, so the new keys you create do not get stolen too.
- Check your exposure with CloudSEK’s tool at exposure.cloudsek.com/react2keys.
- Rotate every secret that was on an affected server. Cloud, AI, GitHub, database and SSH keys. Revoke the old ones, do not just add new ones.
- Check SSH
authorized_keyson each server and remove any key you did not add. - Audit cloud identity and AI-platform usage. Look for activity and billing you do not recognise.
- Rotate keys stored with vendors and watch your AWS account. This one comes from easyDNS’s advice to its customers, not from CloudSEK.
Steps 1 to 5 follow CloudSEK’s recommendations as reported.
Picture a small agency in Ntinda with ten client sites on one VPS and one AWS key shared by all of them. That is ten rotations and ten redeploys, and you do it on a hotspot while the power is on and off. Better to do it on a calm Tuesday than after an AI bill arrives.
How do I stop secrets reaching GitHub?
Turn on secret scanning and push protection. GitHub’s docs recommend push protection to block new secrets before they land in a repo. They also say not all secret types are push-protected by default, and that validity checks can ask the issuing service whether a leaked key is still active.
Check GitHub’s current plan page to see what your private repos get. Plans change, and I did not read that page.
When an alert comes in, GitHub says to rotate the credential immediately. Scrubbing git history is time-intensive and often unnecessary once the credential is revoked. So do not waste the evening rewriting history. Revoke the key first.
What about .env files and least privilege?
The reports above do not cover these, and I have no AWS or OWASP page to cite, so take this as my opinion and check your cloud provider’s own guidance.
The React2Keys list shows what sat on web servers: cloud keys, database logins, AI keys. The fewer of those a server holds, and the less each one can do, the less a thief gets. My habits:
- Keep
.envin.gitignorefrom the first commit. - Give each key one project and the smallest permissions that work.
- Keep a list of where every key lives. You cannot rotate what you forgot.
Do Ugandan firms have legal duties if keys leak?
If the keys protect personal data, possibly. DLA Piper’s summary lists Uganda’s Data Protection and Privacy Act, 2019 as covering security measures in sections 20 to 22 and breach notification in section 23. It also says controllers must make sure processors apply the Act’s safeguards.
I could not read the Act’s full text, so I will not quote deadlines or penalties. Read the Act and its Regulations, or ask a lawyer. This is general information, not legal advice. In Nairobi, check the Office of the Data Protection Commissioner’s own guidance.
Quick tips
- Set billing alerts on your AI and cloud accounts. In React2Keys, AI requests were billed to victims.
- Do not rely on a vendor’s control panel as your key vault. If you must store keys there, rotate them on a schedule and after any breach notice.
- Unsalted fast hashes are what got exposed at easyDNS. If you build login systems, use salted password hashing.
- Do not treat “we are small” as protection. Certificate Transparency logs list new certificates for anyone to read.
If you only have an hour this week, spend it on rotation. Patch first, then rotate every key on your Next.js servers.
Frequently asked questions
Is patching enough after React2Shell?
No. CloudSEK says stolen credentials and planted SSH keys can remain usable after patching, so you must also revoke the secrets and remove unknown keys.
Should I delete a leaked key from git history?
Rotate it first. GitHub says scrubbing history is time-intensive and often unnecessary once the credential is revoked.
Can small agencies be targeted?
Yes. The attackers found new domains through public Certificate Transparency logs, not by company size.
Are AI API keys really worth stealing?
According to CloudSEK, attackers tested stolen AI keys and ran AI requests billed to victims, so treat them like cloud keys.
Does GitHub block every secret type on push?
No. GitHub's docs say not all secret types are push-protected by default.