WhiteSource, an open source security and management provider has tracked an average of 32,000 new npm packages published every month during 2021. That level of activity enabled threat actors to launch a number of attacks, including software supply chain attacks, cryptojacking, data stealing, botnets and security research where attackers create packages that falsely claim to be designed for security research but actually contain malicious code.
Attackers are focusing more efforts on using npm for their own nefarious purposes and targeting the software supply chain using npm. In these supply chain attacks, adversaries are shifting their attacks upstream by infecting existing components that are distributed downstream and installed potentially millions of times. Likewise, attackers release new malicious components and trick users into installing and using them.
“With an average of over 17,000 new npm package versions being published daily in 2021, there’s no question that package update activity needs to be closely monitored,” said Rami Sass, Co-Founder and CEO of WhiteSource. “Unfortunately, that popularity is being used by threat actors to spread malware and launch attacks that harm businesses and individuals.”
The report also identifies best practices to thwart npm attacks. Deploying a tool to ensure use of only verified package sources, shift left approach, avoiding to install packages without running assessment, reporting unexpected behaviours and inconsistencies to packages owners are some of the practices.