News for hackers. Stuff that matters.
Re:How to gain code execution on hundreds of millions of peo... by prophesi on Friday February 28, 2025 @11:59PM (#43216099)
I think that's throwing the baby out with the bathwater; sane defaults are still an important thing to think about when developing a product. And for something as important as a database, which usually requires authentication or storing personal information, let your tutorials focus on these pain points instead of the promise of a database-driven app with only clientside code. It's awesome, but I think it deserves the notoriety for letting you shoot yourself in the foot and landing on the front page of HN. Author also found a similar exploit via Firebase for the Arc Browser[0]

I have a similar qualm with GraphQL.

[0] https://kibty.town/blog/arc/

Re:How to gain code execution on hundreds of millions of peo... by cdmyrm on Saturday March 01, 2025 @03:42AM (#43217340)
Any purported expert who uses software without considering its security is simply negligent. I'm not sure why people are trying to spin this to avoid placing the blame on the negligent programmer(s).
Re:How to gain code execution on hundreds of millions of peo... by misiek08 on Saturday March 01, 2025 @04:31AM (#43217619)
Weak programmers do this to defend this group making crap software. I agree that defaults should be secure and maybe there should be request limit on admin, full access token - but then people will just create another token with full access and use it.
Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Saturday March 01, 2025 @03:22PM (#43223274)
And if it is the programmer's fault, what can we do about it? People are trying to avoid finding a solution that isn't throwing their hands up in the air. We either need to solve the problem in a place that is effective with the situation as it is (the tools) or we need to solve the situation such that it has consequences for doing the wrong thing on the part of the developer. Which shall it be?
Re:How to gain code execution on hundreds of millions of peo... by ImPostingOnHN on Sunday March 02, 2025 @09:19AM (#43230740)
Since those are only 2 options, and there are many more options, I'll pick option 3: convince people to value and fund universal education more from preschool on, building a better foundation for engineers and other professions in the decades following.

In addition to that, it'd be cool if the blameless postmortems were made public, so everyone could learn from them.

As for the other 2 options of restricting freedom, and extremely blameful postmortems, I reject both.

Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Sunday March 02, 2025 @03:35PM (#43234761)
Yes, being held accountable for your decisions is a restriction on your freedom.
Re:How to gain code execution on hundreds of millions of peo... by ImPostingOnHN on Sunday March 02, 2025 @05:41PM (#43236035)
I still choose the third option, because it is the better of the three, compared to restricting what functionality the software people write is allowed to have, and extremely blameful postmortems (which are bad).
Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Sunday March 02, 2025 @07:32PM (#43236942)
All restrictions are bad, and accountability is bad. Got it. I'm glad to have had this discussion with you; very thought provoking.
Re:How to gain code execution on hundreds of millions of peo... by ImPostingOnHN on Sunday March 02, 2025 @11:39PM (#43238366)
Again, I still choose the third option, because it is the better of the three, compared to restricting what functionality the software people write is allowed to have, and extremely blameful postmortems (which are bad).

You seem really stuck on the first two options. Why does it matter, given that the third is the best? Do you still insist on your false dichotomy?

Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Monday March 03, 2025 @06:56AM (#43240891)
It isn't exactly surprising that someone who is the beneficiary of a system which has no accountability is against the imposing of such, I was just hoping you had something better to offer back than 'I don't like it' and assertions that something is bad without ever explaining why. I have no idea why 'blameful postmortems' are bad because you never told me, you just say it is. Why should I change my mind in that case?
Re:How to gain code execution on hundreds of millions of peo... by ImPostingOnHN on Monday March 03, 2025 @11:36AM (#43243508)
>I have no idea why 'blameful postmortems' are bad because you never told me

Usually when you don't know something, you ask someone who knows. Since you sort-of asked here, I'll give you the answer:

Blameless postmortems lead to fewer failures, which is ostensibly the goal here. So what do you get from your idea of blameful ones? Feeling good about punishing someone, even though you're increasing failures by doing so?

Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Friday March 07, 2025 @04:53PM (#43295158)
That you assign me the responsibility of asking you to explain your assertion sheds a lot of light on this interaction.

Either rhetoric and discourse are unfamiliar to you (for instance, that a basic tenant is that one does not make a strong claim which acts as foundational evidence for their entire premise and then assume it to be taken as fact based on statement alone -- if that were true then 3rd graders would win all arguments by saying 'nuh-uh'), or you don't understand that responsibility can also apply to you in many cases.

Re:How to gain code execution on hundreds of millions of peo... by ImPostingOnHN on Sunday March 09, 2025 @12:06PM (#43310411)
I get that you had your own premise that blameful postmortems were good, and you for sure aren't alone -- it's pretty natural homo sapien thinking to believe punishment for misbehavior always leads to less misbehavior. Did you question those assumptions, though? When those assumptions were challenged, did you pause to think "Hmm, why DO I think that? Is it true?"

There's an even deeper assumption here, too -- you kept referring to blameful postmortems as "accountability", which leads me to think that you might believe you can't have accountability without blaming and punishing individuals. If this is indeed an assumption you hold, you should question whether it, too, is false.

The fun part is, my existence isn't necessary for you to do this, so your personal preferences regarding my tone and style won't affect your introspection and the resulting answers! :)

Re:How to gain code execution on hundreds of millions of peo... by 999900000999 on Saturday March 01, 2025 @09:46AM (#43219683)
I don't know what exactly happened here, but Firebase has two defaults. Test access rules which auto expire and are insecure, or production rules which require auth.

If you do something stupid, like keep ignoring the insecure warning and updating them so they don't expire, that's your fault.

In no other industry do workers blame their tools.

Re:How to gain code execution on hundreds of millions of peo... by prophesi on Saturday March 01, 2025 @12:43PM (#43221598)
The issue usually lies in there not being enough security rules in place, not in keeping insecure rules active. For instance, for the Arc incident which we were given more information on, it was due to not having a security rule in place to prevent unauthorized users from updating the user_id on Arc Boosts in the Firestore.

Go into any other industry and hear when they say, "shoot yourself in the foot", and you've likely stumbled upon a situation where they blame their tools for making it too easy to do the wrong thing.

Re:How to gain code execution on hundreds of millions of peo... by 999900000999 on Saturday March 01, 2025 @01:09PM (#43221852)
If you don't setup any access rules in Firebase, by default it'll deny access.

This means someone setup these rules improperly. Even if, you're responsible for the tools you use. We're a bunch of people getting paid 150k+ to type. It's not out of the question to read documentation and at a minimum understand how things work.

That said I don't completely disagree with you, if Firebase enables reckless behavior maybe it's not a good tool for production...

Re:How to gain code execution on hundreds of millions of peo... by prophesi on Saturday March 01, 2025 @01:35PM (#43222144)
And I don't necessarily disagree either; good callout that it _was_ about improperly configured ACL's, I meant more that it wasn't related to keeping test rules alive.

For 150k+ salaries, frontend dev salaries are generally a lot less than their backend counterparts. And scrappy startups might not have cash for competitive salaries or senior engineers. I think these are a few of the reasons why Firebase becomes dangerous.

Re:How to gain code execution on hundreds of millions of peo... by 999900000999 on Saturday March 01, 2025 @02:09PM (#43222535)
150k is more than a fire fighter in San Francisco.

https://sf-fire.org/employment-opportunities/h2-firefighter

I don't think it's out of the question to expect professionalism at 150k. These are VC funded companies, not a couple of college kids scraping together a prototype.

Then again, if I was a CTO seeing stories like this I'd be inclined to NOT use Firebase. I'm actually using Supabase right now since I don't like vendor lock in. Deploying Supabase manually is really difficult, but it is an option.

I imagine if I ever run a serious company, which I don't think will ever happen, I would take something like Supabase and run it on prem with some manner of enhanced security.

It's interesting though... For decades the industry has been trying to push this narrative that you don't need servers. You can handle everything using some magic platform, and throw in a couple of custom lambda functions when you need to execute logic.

Parse, Firebase, Appwrite and dozens of others emerged to fill this niche.

ToDesktop, provides even another layer of abstraction. We don't want to handle our own app updates, cool let someone else do it. That someone else doesn't want to manage their own backend, cool let someone else do it.

You end up with multiple layers of potential vulnerabilities which shouldn't exist... Cursor, Arc, etc could run their own update servers.

Maybe the solution is a Steam like distribution platform. Or just using Steam itself. That's a 30% cut to let someone else figure out your app distribution...

Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Saturday March 01, 2025 @03:19PM (#43223237)
> I don't think it's out of the question to expect professionalism at 150k. These are VC funded companies, not a couple of college kids scraping together a prototype.

You can expect whatever you want, just prepare to be disappointed. We have absolutely learned by now that unless there very real consequences for doing or not doing something, you will regularly see the worst possible thing happen. This is why licenses exist and legal 'sign-offs' exist. There needs to be a licensing organization that can revoke people's ability to get certificates or to even be employed working on certain aspects of software if we ever want to solve this problem. I mean, you even need a license to cut hair in many states.

Re:How to gain code execution on hundreds of millions of peo... by 999900000999 on Saturday March 01, 2025 @07:11PM (#43225622)
Your solution is to regulate software instead of calling out bad actors?

What a dystopian future, curl without a permit?

Why are you blaming the rank and file employees. The buck stops with the employer. If anything fine the companies

Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Saturday March 01, 2025 @07:36PM (#43225813)
Asking people to be responsible for the damage they cause is called 'accountability' and not 'dystopia'.

Software is not just something someone uses for hobbies or for word processing or whatever. A bad design decision in some critical software can have just as much of an impact as a bad design decision in a bridge or an airplane. If we want to be called 'engineers' then we need to put more on the line than just a public apology when something goes wrong due to a decision someone actively made to save money or reduce the work involved. And of course it should involve the people who make those decisions and not just the grunt who implemented them.

But if the 'grunts' had the power to say 'no, I will not do this because it is insecure and my license is on the line' then that's a good thing. No?

Re:How to gain code execution on hundreds of millions of peo... by 999900000999 on Saturday March 01, 2025 @08:42PM (#43226210)
>But if the 'grunts' had the power to say 'no, I will not do this because it is insecure and my license is on the line' then that's a good thing. No?

This will never work in a global economy. If you outsource the software you're just begging companies to find someone making 15$ the fall guy.

Sounds pretty bad. Your manager tells you to do something stupid or your fired. You do so, and when it fails they blame you and your software engineering license is revoked. You can't find a job and now get to live in a homeless shelter.

Meaningful fines for companies is the only way to fix this.

Maybe... For some sensitive things like location data an expensive permit should be required. But this needs to be a corporate responsibility, not an individual one.

In your scenario bad companies are going to ruin the lives of their employees by making them risk their licenses.

Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Saturday March 01, 2025 @09:51PM (#43226696)
How do engineers manage it then? What about banks? Any regulated industry? It obviously works for some professions, why is software the exception?
Re:How to gain code execution on hundreds of millions of peo... by 999900000999 on Sunday March 02, 2025 @02:25PM (#43234004)
Why do you want to regulate software?

Arguably this whole thing wouldn't happen if these apps were distributed and updated via the OSX app store. If that's the future you want, it's largely already here.

You can check a setting in OSX to make it so.

Who decides what software to regulate. Do I need a permit to install Python ?

Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Sunday March 02, 2025 @03:44PM (#43234860)
> Why do you want to regulate software?

I don't want to regulate software. I want people to have something to lose if they make a decision that has a large impact.

> Arguably this whole thing wouldn't happen if these apps were distributed and updated via the OSX app store. If that's the future you want, it's largely already here.

I don't understand this point.

> Who decides what software to regulate.

Who decides any laws or regulations?

> Do I need a permit to install Python ?

Does you installing Python have potential consequences for large numbers of people or could it cause a significant amount of harm?

Why do you take the most extreme possible position and apply it to me? Is it that difficult to argue against a sensible one?

Re:How to gain code execution on hundreds of millions of peo... by 999900000999 on Sunday March 02, 2025 @09:35PM (#43237700)
> Arguably this whole thing wouldn't happen if these apps were distributed and updated via the OSX app store. If that's the future you want, it's largely already here.

I don't understand this point.

The core of this issue is an insecure updating mechanism for desktop apps. You can argue for security sake, users may opt to only use the official Apple app store or the official Microsoft store. In this case instead of having a random startup manage the update process, you have a couple of multibillion dollar companies.

I'm trying to figure out what exactly you want to happen here. Would you essentially make it a legal to distribute software without a permit ? Would distributing certain software require a permit ?

Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Monday March 03, 2025 @09:09AM (#43241873)
I am expressing long held frustration that software engineering as a culture is trying to eat its cake and still have it. Wanting to be called an engineer, demanding a high salary and running the largest sections of the economy and disrupting society in highly impactful ways, yet whenever someone asks them to take responsibility for any damage caused they downplay their role and anyone else's in the industry. It is time to grow up. If you make a decision to make more money or do less work, knowing that it has a risk to cause major problems for infrastructure, economy, or other people, then there should be something more on the line for you than a 'oopsie' at the end of it if you lose that bet.
Re:How to gain code execution on hundreds of millions of peo... by 999900000999 on Monday March 03, 2025 @01:14PM (#43244843)
I'm on the side of freedom.

If you want to run your company using vetted software and limit your developers to only use a small list of approved software. You can do that. I've worked in such environments. You can lock down the corporate firewall. The point is choice.

It's completely different if you basically want a regulatory agency which will decide what software people are allowed to build.

Outside of work I like to use niche Linux distros. If I accidentally wipe my vacation photos during the install process, that's a risk I took. I don't have a right to complain that I destroyed my own data and blame it on software largely built by volunteers.

However I don't disagree completely. If you want to build a hardened fork of Linux with software vetted by your private certifying authority, that could be a good market. If all engineers working on your custom fork need to be "licensed" by a privately run organization, that is also fine.

I just wouldn't want the State to do this.

Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Friday March 07, 2025 @04:59PM (#43295219)
What exactly is the difference between an official 'private' organization and an official 'state' organization? The only real difference I can see is that one can actually enforce the rules it makes. I think you may be using this ideological opposition to the State as a way to have something absorb blame for things you do not want to attribute to complex human mechanisms.
Re:How to gain code execution on hundreds of millions of peo... by 999900000999 on Friday March 07, 2025 @07:38PM (#43296386)
The difference is if people should go to jail for writing bad software.

I’d argue no.

Let the private sector regulate this. If you want to use an extremely locked down OS with a small handful of apps, go right ahead.

The State has no role in this.

I guess if you can prove negligence you can sue.

Re:How to gain code execution on hundreds of millions of peo... by ImPostingOnHN on Sunday March 02, 2025 @09:24AM (#43230785)
> A bad design decision in some critical software can have just as much of an impact as a bad design decision in a bridge or an airplane.

This is a better point than you realize. Blameless postmortems in IT are largely inspired by blameless postmortems from aerospace failures.

Re:How to gain code execution on hundreds of millions of peo... by Eisenstein on Sunday March 02, 2025 @12:30PM (#43232771)
If aerospace gets away with it then we should fix that as well.
Re:How to gain code execution on hundreds of millions of peo... by ImPostingOnHN on Sunday March 02, 2025 @02:06PM (#43233789)
On the contrary: blameless postmortems are better.