Awesome Node.js Security resources
A curated list of awesome Node.js Security resources.
Learn Node.js Secure Coding techniques and best practices from Liran Tal
mysql`…`
) that understands Postgres’s & MySQL’s query grammar to prevent SQL injection.sh`…`
) that understands Bash syntax so prevents shell injection.JSON.parse()
drop-in replacement with prototype poisoning protection.JSON.parse()
drop-in replacement with prototype poisoning protection.npm install
lifecycle scripts.ses
to confine third-party dependencies and limit their access to host powers based on policies generated by trust-on-first-use static analysis.nodejs/secuirty-wg
GitHub repository maintains a /vuln/core
directory with all the CVEs applied to Node.js runtime versions.The following is a list of known protestware spanning across other ecosystems too:
event-source-polyfill
, Mariusz Nowak and their es5-ext
, Evan Jacobs and their styled-components
, node-ipc, peacenotwar
, nestjs-pino - all with regards to the Russian-Ukraine crisis.Articles covering the topics around protestware are:
Collection of security incidents that happened in the Node.js, JavaScript and npm related communities with supporting articles:
Date | Name | Reference Links |
---|---|---|
2024 Nov 12 | “node-request-ip”, “request-ip-check” and “request-ip-validator” are fake IP checker utilities on npm target cryptocurrency and install trojans | sonatype |
2024 Oct 31 | Lottie Player npm package compromised for crypto wallet theft | Snyk |
2024 Oct 31 | Typosquat campaign targeting Puppeteer, Bignum.js, and some 137 other cryptocurrency libraries | Phylum |
2024 Oct 28 | Dependency confusion campaign used in an npm supply chain security leveraged to breach Fortune 500 company | https://www.landh.tech/blog/20241028-hidden-supply-chain-links/ |
2024 Oct 4 | lodasher , them4on , laodasher counterfeit npm packages aimed to backdoor Windows users with a modified AnyDesk binary |
Sonatype |
2024 Jul 16 | string-width-cjs and other Suspicious Maintainer Unveils Threads of npm Supply Chain Attack |
Snyk |
2024 Jul 11 | noblox-ts starjacking and QuasarRAT on npm |
stacklok |
2024 Jun 17 | ua-parser-js switches to AGPL+commercial in “rug pull” move |
Adventures in Nodeland |
2024 Jun 11 | cors-parser npm package hides cross-platform backdoor in PNG files |
Sonatype |
2024 Jun 03 | npm regsitry cache poisoning attack | landh.tech |
2024 Apr 26 | Fake job interviews target developers with new Python backdoor | Bleeping Computer |
2024 Apr 16 | Tea tokens and developers abusing OSS infrastructure for monetization | Sonatype |
2024 Feb 6 | noblox.js-proxy-server malicious npm Package Masquerades as Noblox.js, Targeting Roblox Users for Data Theft | Socket |
2024 Jan 25 | npm flooded with 748 packages that store movies | Sonatype |
2024 Jan 3 | An everything package with a registry-wide dependencies prevents from packages to be unpublished |
SC Media |
2023 Dec 14 | Ledger supply chain security attack introducing crypto drainer malware (@ledgerhq/connect-kit) | Sonatype, Tweets 1 2 3 4 5 6 7 8 |
2023 Sep 27 | Spoofed Dependabot commits steal GitHub tokens and inject malware to JavaScript files | Checkmarx |
2023 Jun 27 | Manifest Confusion - a new publicly disclosed bug with the npm package manager demonstrating package metadata inconsistency | Darcy Clarke’s blog |
2023 Jun 23 | North Korean attackers exploit social engineering and supply chain attacks on npm | Phylum |
2023 Jun 15 | Supply Chain Attack Exploits Abandoned S3 Buckets to Distribute Malicious Binaries for bignum npm package | The Hacker News, Checkmarx |
2023 Jun 06 | Recommended packages by ChatGPT may be exploited for supply chain security attack vector | Vulcan |
2023 Feb 16 | Researchers Hijack Popular NPM Package with Millions of Downloads | Illustria on The Hacker News |
2023 Feb 10 | Researchers Uncover Obfuscated Malicious Code in PyPI Python Packages, affiliated npm ecosystem evidence too | The Hacker News |
2023 Jan 29 | Phylum Identifies 137 Malicious npm Packages | phylum |
2022 Nov 29 | Invisible npm malware may hide in crafted versions and bypass npm audit’s security checks | JFrog |
2022 Nov 24 | Phylum team captures captures malicious npm package imagecompress-mini claims to be an image compress tool | Louisw Lang on Twitter |
2022 Oct 12 | Aqua security discovers flaw in npm that allows disclosing of privately hosted npm packages on the registry | Aqua |
2022 Oct 07 | LofyGang Distributed ~200 Malicious NPM Packages to Steal Credit Card Data | TheHackerNews |
2022 Sep 23 | Popular Cryptocurrency Exchange dYdX Has Had Its NPM Account Hacked | Mend |
2022 Jul 29 | malicious packages small-sm , pern-valids , lifeculer , and proc-title target stealing credit card information and discord tokens |
darkreading |
2022 May 26 | stolen oAuth GitHub tokens lead to npm security breach, compromised user accounts metadata, private packages, and plain-text passwords in logs | GitHub |
2022 May 24 | malicious npm packages exploiting dependency confusion attacks | Snyk, Snyk |
2022 May 23 | npm packages hijacked due to expired domains | TheRegister |
2022 Apr 05 | New npm Flaws Let Attackers Better Target Packages for Account Takeover | Aqua |
2022 Apr 26 | npm package planting | Aqua, The Hacker News |
2022 Mar 31 | More protestware from styled-components |
Checkmarx Security blog |
2022 Mar 18 | More protestware from es5-ext and event-source-pollyfill |
Snyk advisory for event-source-pollyfill, es5-ext commit, ArsTechnica |
2022 March 16 | peacenotwar module sabotages npm developers in the node-ipc package to protest the invasion of Ukraine |
Snyk blog, Darkreading, SC Magazine |
2022 Mar 7 | Malicious packages caught exfiltrating data via legit webhook services | Checkmarx Security blog |
2022 Feb 22 | 25 Malicious JavaScript Libraries due to typosquatting attacks | TheHackerNews |
2022 Feb 11 | 2,818 npm accounts use email addresses with expired domains | TheRecord |
2021 Dec 08 | 17 JavaScript libraries contained malicious code to collect and steal Discord access tokens and environment variables from users’ computers - | TheRecord |
2021 December 01 | The Bladabindi trojan and RAT malware | Sonatype |
2021 November 04 | coa and rc packages - Popular npm library ‘coa’ was hijacked today with malicious code injected into it, ephemerally impacting React pipelines around the world | Bleepingcomputer, the record, npm tweet, npm tweet for rc. |
2021 October 27 | noblox.js-proxy and noblox.js - typosquatted npm package that target users of official roblox API and SDK npm package (noblox.js) | the register |
2021 October 22 | ua-parser-js - Versions of a popular NPM package named ua-parser-js was found to contain malicious code | Cybersecurity and Infrastructure Security Agency (CISA), github issue, IOCs, portswigger, theregister |
2021 September 02 | pac-resolver - can enable threat actors on the local network to run arbitrary code within your Node.js process whenever it attempts to make an HTTP request | arstechnica.com |
2021 August 07 | npm package ownership process firing back and exposing potential vectors for supply chain security risks. | |
2021 April 13 | New Linux, macOS malware hidden in fake Browserify NPM package: web-browserify | Bleepingcomputer. |
2020 December 02 | jdb.js - db-json.js - malicious npm packages caught installing remote access trojans. | zdnet.com, Bleepingcomputer. |
2020 November 09 | discord malicious npm package - Npm package caught stealing sensitive Discord and browser files | sonatype, zdnet. |
2020 November 03 | twilio-npm - malicious npm package opens backdoors on programmers’ computers. | zdnet |
2020 August 29 | fallguys - malicious package stealing sensitive files. | zdnet |
2020 April 27 | is-promise - one-liner library breaks an ecosystem. | Forbes Lindesay - Maintainer post-mortem, snyk’s postmortem |
2019 August 22 | bb-builder - malicious package targeting Windows systems to exfiltrate information and send to a remote service. | Snyk, Reversing Labs, Bleeping Computer |
2019 June 05 | EasyDEX-GUI - malicious code found in npm package event-stream. | npm, snyk, komodo announcement |
2018 November 27 | event-stream - malicious code found in npm package event-stream. | github issue snyk, snyk’s postmortem, schneid, intrinsic, npm, jayden, hillel wayne’s postmortem |
2018 July 12 | eslint - malicious packages found in npm package eslint-scope and eslint-config-eslint. | github issue, eslint tweet, eslint’s postmortem, nodesource’s postmortem, npm’s statement |
2018 May 02 | getcookies - malicious package getcookies gets embedded in higher-level express related packages. | GitHub issue, npm, bleepingcomputer.com, Snyk’s getcookies vulnerability page, Hacker News |
2018 Feb 13 | maintainer account with access to conventional-changelog npm package compromised and published malware for 1 day and 11 hours | conventional-changelog repository update |
2017 August 02 | crossenv - malicious typosquatting package crossenv steals environment variables. | CJ blog on typosquat packages, Typosquatting research paper, bleepingcomputer.com, Snyk’s crossenv vulnerability page, Hacker News |
2016 March 22 | left-pad - how one developer broke Node, Babel and thousands of projects in 11 lines of JavaScript. | left-pad.io, The Register, qurtaz. |
Follow-up notes:
Found an awesome project, package, article, other type of resources related to Node.js Security? Send me a pull request!
Just follow the guidelines. Thank you!
say hi on Twitter