Hacker News new | ask | show | jobs
by woodruffw 22 days ago
You should do both: you should let normal updates cool down, and you should immediately patch security advisories.

One of the biggest ergonomic problems with cooldowns is that many tools let the former goal obstruct the latter. Both should be part of the state machine of resolution itself, rather than things that get layered on.

5 comments

Usually people advocate dependency cooldowns as a mitigation for supply-chain attacks, where you're depending on a module with a malicious maintainer, possibly a new one (perhaps one who stole the old maintainer's keys so they can pretend to be the old maintainer).

In that situation, how do you distinguish between "normal updates" (that you should let cool down) and "security advisories"? If all the hypothetical malicious maintainer has to do to get you to update is to publish a security advisory for their own package, wouldn't they just do that? It might even be a real advisory about a real security hole that they introduced, but claiming more versions are affected than actually are affected.

It takes additional permissions, in general, to issue an advisory. And “supply chain” attacks in general tend to be used by smash-and-grab attackers, who don’t have time on their side. It’s not like a browser 0day where the attacker’s goal is to preserve their underlying exploit primitive for as long as possible.
Additional permissions?
I’m talking about things like GHSAs. You can’t issue one just by compromising a push credential to a repository, which is how most of these supply chain attacks start.
Waiting for someone to hold back a vulnerability until they can compromise a package, then release vuln publicly for maximum impact.

It’s only a matter of time.

How do you separate security advisories from regular updates? (If it’s just a box you check, it only means attackers will say “this is a security update” on the malicious package they upload.)

The point of cooldowns is for when a crate author’s account is compromised and used to publish malicious code. Saying “security advisories bypass cooldowns” wouldn’t really help anything there.

> If it’s just a box you check, it only means attackers will say “this is a security update” on the malicious package they upload.

It generally requires additional permissions, per the adjacent respond. And it introduces additional scrutiny on the release, which is the last thing an opportunistic attacker wants (the entire reason “supply chain” attacks are effective is because nobody gives any thought to upgrading their dependencies in the normal case).

There are many cases in which security advisories aren't published. But I guess an alternative could be to update using the cooldown, and then diff the dependencies that would get a newer version if the cooldown wasn't in place to check if they contain anything relevant for the particular application you're developing.
Why wouldn't a supply-chain attacker simply manipulate the project into producing a security advisory to get their exploit code pushed through inside a high-priority release?

I.e. get a puppet/co-conspirator to push vulnerable code; wait until that code gets released as v1.2.3; submit other vulnerable code; wait for that code to be merged and released as v1.2.4; then submit a vuln report for the vuln introduced in v1.2.3; and wait for v1.2.3 + v1.2.4 to be security-deprecated and v1.2.5 to be fast-released to replace them.

Now v1.2.5 exists and has your still-unknown 0day in it, while versions prior to v1.2.5 are deprecated. If devtools that had pinned v1.2.3 get forced "upward" to v1.2.5 despite the cooldown, you win.