Multiple times
The whole "package" managers ecosystem is built on trust.
We blindly trust package maintainers
that their code is safe.
My computer
Registry
give me
package Foo
in version 1.2.3
sure, here it is
Foo
1.2.0
Foo
1.2.1
Foo
1.2.3
Foo
1.2.2
Foo
1.2.4
Foo
1.2.3
My computer
Registry
give me
package Foo
in version ~1.2.3
sure, here it is
Foo
1.2.0
Foo
1.2.1
Foo
1.2.3
Foo
1.2.2
Foo
1.2.4
Foo
1.2.4
They usually steal login credentials
or auth tokens
It depends
In case of NPM it is usualy few hours until someone notices
Few hours is a plenty of time to infect thousands of devices