News for hackers. Stuff that matters.
Re:What NPM should do to stop a new colors attack by jamincan on Monday January 10, 2022 @04:44PM (#29883087)
In what world is it not malicious? He owned the packages and I guess that gives him the right to do what he likes with it, but I have a hard time believing he didn't do it deliberately fully aware that a whole bunch of people would update and it would cause disruption. It's not an exploit, but it's certainly malicious, and I don't think it's unreasonable to call it an attack.
Re:What NPM should do to stop a new colors attack by foobiekr on Monday January 10, 2022 @05:59PM (#29884197)
People who were pulling this unvetted and live are lucky he did not sell it to a malware group.
Re:What NPM should do to stop a new colors attack by UnFleshedOne on Monday January 10, 2022 @09:11PM (#29886347)
Malice or selling out is not even required. Malware groups are perfectly capable of getting access to maintainer credentials themselves if needed.
Re:What NPM should do to stop a new colors attack by foobiekr on Tuesday January 11, 2022 @12:36AM (#29887984)
Yes, I agree.
Re:What NPM should do to stop a new colors attack by no_wizard on Monday January 10, 2022 @04:59PM (#29883329)
Sure did, however, does that mean its malicious?

The definition of malicious, according to Merriam Webster[0], is the following

>having or showing a desire to cause harm to someone : given to, marked by, or arising from malice

Was the intention here to cause someone harm? What the intention here malice? Which conversely has this definition[1]

>desire to cause pain, injury, or distress to another

Was this their primary motivation? What evidence do we have that is in fact an action driven by malice? In fact, I don't see any, especially after doing roughly 20 minutes of research, I have arrived at the following:

Reading the public history surrounding the maintainer of these projects, the issue trackers of the repositories, and the maintainers own blog, you may come from a different conclusion entirely. If I was to speculate - and mind you, I am speculating, as I don't know the maintainer personally nor do I claim to understand them completely - there is a clear sense of mental strain they are feeling from the burdens here. Being burnt out, feeling taken advantage of, can lead to very real and deep feels of depression and/or other mental challenges (this I speak first hand to), for starters. I think the maintainer - again, speculating here, however evidence does seem to suggest this - is acting from a place of disillusionment, and possibly is resentful of their status in the word, relative to those benefiting from their contributions to open source software. Are they right to feel this way? Maybe, maybe not. However, is this malice? That's the question. Is this actually malicious? All evidence points to no, its not an act of malice. Its an act of someone who is disillusioned, strained, and struggling. I think the most reasonable interpretation given all the evidence is that they are trying to raise some kind of awareness - albeit in ways that I don't think is well communicated, due to the issues I previously highlighted - most likely.

I could be wrong, I'm just following the publicly available evidence and, its a lot more murky than this is an malicious act by a malicious maintainer acting in malice.

And again, this brings up the broader issue around open source maintainability, longevity, the role of consumer and maintainer, and how to build better symbiotic relationships around that, yet we aren't talking about what lead to this event, which I would argue is more important than what happened.

My ask is for nuance in this conversation, where there is seemingly little.

[0]: https://www.merriam-webster.com/dictionary/malicious

[1]: https://www.merriam-webster.com/dictionary/malice

Re:What NPM should do to stop a new colors attack by Shaanie on Monday January 10, 2022 @05:12PM (#29883507)
You write a lot of words to explain how the maintainer could justify his malice. At the end of the day it's still done out of malice, though.

Unless he's gone absolutely bonkers, he's doing this to intentionally cause damage. The reason for it does not matter, as the definition you posted helpfully points out.

Re:What NPM should do to stop a new colors attack by no_wizard on Monday January 10, 2022 @05:20PM (#29883637)
Is it though?

Was it malice when maintainers started adding those posinstall scripts asking for funding? which lead directly to the creation of `npm fund`, for instance. Was that also malice?

Given all the evidence we have - I think its murky. That's my point, at the end of the day.

Arguably, I could say that making millions of dollars off an open source library and not contributing back is malice - yet that argument is rarely given the same open and shut approval.

Mind you, this is bigger, IMO, than `faker.js`, this raises questions around open source software as a whole, that are relevant in this case and beyond

There's nuance in this conversation that is missing so far.

Re:What NPM should do to stop a new colors attack by FunHearing3443 on Monday January 10, 2022 @05:31PM (#29883781)
I keep seeing this comment that companies are making their millions 'off of open source libraries' and it's a catchy phrase but let's be real the big companies that are using faker JS are making an insignificant amount extra by using that library, there are alternatives to mock data, etc. A key feature of MIT style licenses is that you can do whatever the hell you want with it for free, use a more restrictive license if you don't want people making a bunch of money off your code. I feel bad for this maintainer but a good takeaway is probably to not do a bunch of work for free unless you see a path to income down the road from it.
Re:What NPM should do to stop a new colors attack by watwut on Monday January 10, 2022 @05:43PM (#29883953)
It is actively anti open source argument. It makes limited sense in subculture where contributing to open source is expected, but that subculture is absurdly small and answer to it is "this absolutely should not be mandatory".

In any other context, it is argument against open source existing.

Re:What NPM should do to stop a new colors attack by acdha on Monday January 10, 2022 @05:56PM (#29884153)
> Was it malice when maintainers started adding those posinstall scripts asking for funding? which lead directly to the creation of `npm fund`, for instance. Was that also malice?

No, because that did not impair use of those libraries whereas this change deliberately broke every program written by someone who trusted him and used his code under the social contract he offered.

Open source maintainer funding and burnout are real problems but betrayal won't make things better. Imagine if you lived in a house with a bunch of roommates who weren't doing their share of the housework — you're entirely within your rights to stop volunteering to clean the toilet but it's crossing a line if you instead modify it to flush up.

Re:What NPM should do to stop a new colors attack by runarberg on Monday January 10, 2022 @06:13PM (#29884411)
What is being described here is a prototypical case of industrial sabotage. Books have been written about it, the jury is very much not out on whether we should consider it malicious, although I very much consider it not... In fact industrial sabotage is quite often made out of love for the fellow worker.

This is very much a philosophical question and I doubt we will resolve it here on HN. However if you want to deem this act malicious I beg you to ask your self: To whom is the malice directed towards, who was harmed the most? What does this act tell us about the industry?

I, on the other hand, see this sabotage as a clear act of love from a fellow worker.

Re:What NPM should do to stop a new colors attack by acdha on Monday January 10, 2022 @06:27PM (#29884582)
Sabotage is still malicious even if you sympathize with the motivations.

I would also strongly question any “fellow worker” explanation since I'm sure the pain will almost universally be felt by the “fellow workers” who have to update things, reassure their security team, or increasingly start justifying their use of open source software.

Re:What NPM should do to stop a new colors attack by runarberg on Monday January 10, 2022 @06:38PM (#29884717)
As is usually the case in most direct action. Your average strike will cause much further harm then this act for other workers. However the goal is not to halt production, halting production is simply a means to an end, the goal is usually better working conditions for the rest of the workers. This is why you often see workers stand in solidarity with strikers even when the strike directly harms them.
Re:What NPM should do to stop a new colors attack by acdha on Monday January 10, 2022 @07:04PM (#29885045)
In that case, this is extremely weak since it was so quickly and easily reversed. A strike which has no purpose or chance of success tends not to get much support.
Re:What NPM should do to stop a new colors attack by dahdum on Monday January 10, 2022 @10:17PM (#29886996)
> To whom is the malice directed towards, who was harmed the most? What does this act tell us about the industry?

It certainly wasn't directed at the large corporations, they have many systems in place to mitigate this type of attack. It was directed at everyone else, like fellow open source devs, contractors, hobby developers, students, and small to medium businesses.

The goal simply appears to be chaos and attention.

Re:What NPM should do to stop a new colors attack by MattPalmer1086 on Monday January 10, 2022 @06:45PM (#29884821)
If you publish your code under a license that says anyone can use it for free and don't have to contribute, don't act all hurt when people and companies do just what you said they could.

If you want to get paid, or you require contribution, use an appropriate license. It's not hard.

Re:What NPM should do to stop a new colors attack by acdha on Monday January 10, 2022 @05:13PM (#29883517)
It broke a ton of other people’s projects, on purpose. You can argue that he could have done much worse — say exfiltrating all of the AWS credentials from CDK users – but there’s no definition where it’s not an abuse of trust to sabotage your users.

https://github.com/aws/aws-cdk/issues/18322

Re:What NPM should do to stop a new colors attack by zdragnar on Monday January 10, 2022 @05:24PM (#29883684)
Nobody had to upgrade. Anyone who accidentally upgraded because their dependencies had sloppy programming practices should be mad at their direct dependencies.

aws-cli should not be an attack vector, and if it is, AWS engineers are at fault.

Re:What NPM should do to stop a new colors attack by chaostheory on Monday January 10, 2022 @05:43PM (#29883959)
This is a terrible argument. Marak didn't have to purposely break anyone's projects either. If he wanted to end it, he should have just sent a goodbye message stating the end of his involvement and walked away. This is the normal thing to do. If he wanted to be paid, he should have either picked the appropriate license at the beginning, or just changed it for future versions. The latter has also been done before with SugarCRM being one example. They are still around with paying customers. Something as free for all as the MIT license sends the wrong message.

This has been posted before, but Marak seems to be mentally unwell right now, which helps explain but doesn't condone his behavior.

https://abc7ny.com/suspicious-package-queens-astoria-fire/64...

Re:What NPM should do to stop a new colors attack by acdha on Monday January 10, 2022 @05:33PM (#29883814)
I don't know what makes you want to try to gaslight people on marak's behalf but this is a pretty poor attempt at doing so. He published a deliberately broken update with a non-breaking version number change to a package management ecosystem where the community expects to follow a semver-ish model where point updates do not break things. This is an abuse of trust, just like it would be if you said “I'm tired of cooking for everyone so I'm going to spit in the soup before serving it”.
Re:What NPM should do to stop a new colors attack by kwinten on Monday January 10, 2022 @05:52PM (#29884093)
But you didn't have to go to that restaurant! Don't you do a full health and safety inspection of every restaurant you visit (and of their entire supply chain)?
Re:What NPM should do to stop a new colors attack by edoceo on Monday January 10, 2022 @06:05PM (#29884285)
Up-thread there is a comment that the Major on the semver was updated. Which is correct? Was it Major or Patch number?

Edit to Add: According to this page https://www.npmjs.com/package/faker

The previous version was 5.x.y and the endgame version was 6.6.6

So, which tools defaulted to magically bumping the dependency from 5.x.y to the 6.x.y? Seems like jumping a major shouldn't automatically happen.

Re:What NPM should do to stop a new colors attack by acdha on Monday January 10, 2022 @06:09PM (#29884345)
I'm not sure what they said specifically but https://security.snyk.io/vuln/SNYK-JS-COLORS-2331906 and https://snyk.io/advisor/npm-package/colors show that the version went from 1.4.0 to 1.4.1.

Edit: your comment makes more sense now that I see it was talking about faker.js.

Re:What NPM should do to stop a new colors attack by zdragnar on Monday January 10, 2022 @10:36PM (#29887154)
aws-cli, a tool which provides access to an absurd amount of resources (compute, storage, text messaging to name a few) relies on "community expectation of semver-ish adherence" for security and continual operation, and I'M the one gaslighting people?
Re:What NPM should do to stop a new colors attack by acdha on Monday January 10, 2022 @10:50PM (#29887296)
You meant CDK (aws-cli is written in Python) but it’s not that simple: they shipped a lock file which pinned 1.4.0 but while NPM honors that the popular yarn package manager does not:

https://github.com/aws/aws-cdk/issues/18322#issuecomment-100...

This floating behavior allowed for it to be overridden locally:

https://github.com/aws/aws-cdk/issues/18322#issuecomment-100...

Re:What NPM should do to stop a new colors attack by zdragnar on Tuesday January 11, 2022 @12:34PM (#29894661)
Ah yes, the classic "you're holding it wrong" defense.
Re:What NPM should do to stop a new colors attack by slibhb on Monday January 10, 2022 @05:06PM (#29883420)
Pushing broken code on purpose is malicious.
Re:What NPM should do to stop a new colors attack by 9935c101ab17a66 on Tuesday January 11, 2022 @11:12PM (#29902199)
> Was this their primary motivation?

> Was the intention here to cause someone harm? What the intention here malice?

Yes. Removing / archiving the project – not malice. This, however is absolutely malicious:

  let am = require('../lib/custom/american');
  am();
  for (let i = 666; i < Infinity; i++;) {
    if (i % 333) {
      // console.log('testing'.zalgo.rainbow)
    }
    console.log('testing testing testing testing testing testing testing'.zalgo)
  }
> Are they right to feel this way? Maybe, maybe not. However, is this malice?

Reasoning about Marak's motivation or intentions does have anything to do with whether his actions were ultimately malicious.

> Its an act of someone who is disillusioned, strained, and struggling.

You might be right, but there were a lot of things he could have done before doing what he did, and when he did act, he did it with the intention of causing people distress, frustration and confusion.

> ...its a lot more murky than this is an malicious act by a malicious maintainer acting in malice.

We're really far down a semantic rabbit hole at this point. Ultimately, adding an infinite loop to a widely used package deliberately and without warning is clearly an attempt to 'cause ... distress to another.' There's no two ways about it. Sure, Marak likely felt under-appreciated, mistreated and taking advantage of by large corporations etc but those possible explanations do not absolve him of blame, or mean his actions were not unequivocally malicious. In the legal system, mitigating factors can lead to a lesser charge or a shorter sentence, but even if they do reduce the severity of the outcome, you're still guilty.

Re:What NPM should do to stop a new colors attack by rezonant on Monday January 10, 2022 @05:16PM (#29883557)
> Whats the intention here to cause someone harm?

The change has an infinite loop, so it literally breaks any software that uses it.

Re:What NPM should do to stop a new colors attack by sintaxi on Tuesday January 11, 2022 @12:03AM (#29887788)
Also the description, readme, and roadmap that was included in the package still passed it off as a functioning library which makes this a trojan.