News for hackers. Stuff that matters.
Re:Resend Security Incident by sikan_ on Wednesday January 10, 2024 @05:35PM (#38944409)
Database credentials in the dashboard..? How?
Re:Resend Security Incident by laborcontract on Wednesday January 10, 2024 @06:41PM (#38945225)
Like my sibling said, probably as a next_public environmental variable.

They probably were doing fetch requests for the dashboard client side. I wonder if they had the entire db url stored as a next_public_db_url. If that’s really irresponsible, and pretty easy to catch in development, at least for the pages router stuff. Maybe a little less so obvious for ssr pages.

I haven’t tried a lot of the new app_router, maybe there’s a lot more mixing of client and server side stuff there. Regardless, you should be auditing your environmental variables!

Re:Resend Security Incident by sikan_ on Wednesday January 10, 2024 @08:03PM (#38946010)
RSC seems like a massive foot gun - given that you can accidentally bundle anything from the server.
Re:Resend Security Incident by dimfeld on Wednesday January 10, 2024 @06:14PM (#38944922)
I have no inside info, but it sounds like the key was inadvertently bundled into the client-side code. This could happen when using web frameworks that do both client-side and server-side rendering, if one of your client-side files imports something from a file that is supposed to be server-only, and contains the API key environment variable.

Some frameworks automatically detect this and fail to build if you do it, but apparently not all of them.

Re:Resend Security Incident by josevalerio on Wednesday January 10, 2024 @06:13PM (#38944897)
Probably all the new NextJS / Server Components stuff - mixing and matching server & client code in the same file. Or the classic NEXT_PUBLIC_ env var
Re:Resend Security Incident by sgarman on Wednesday January 10, 2024 @05:55PM (#38944662)
They say so much in their article but never dive into how this happened, seems like the most important part? User error? Configuration error?
Re:Resend Security Incident by h1fra on Thursday January 11, 2024 @04:22AM (#38949779)
Maybe it was a Supabase or Firebase credentials ?