{"id":14486,"date":"2025-07-22T11:54:47","date_gmt":"2025-07-22T11:54:47","guid":{"rendered":"https:\/\/newestek.com\/?p=14486"},"modified":"2025-07-22T11:54:47","modified_gmt":"2025-07-22T11:54:47","slug":"prettier-eslint-npm-packages-hijacked-in-a-sophisticated-supply-chain-attack","status":"publish","type":"post","link":"https:\/\/newestek.com\/?p=14486","title":{"rendered":"Prettier-ESLint npm packages hijacked in a sophisticated supply chain attack"},"content":{"rendered":"<div>\n<div id=\"remove_no_follow\">\n<div class=\"grid grid--cols-10@md grid--cols-8@lg article-column\">\n<div class=\"col-12 col-10@md col-6@lg col-start-3@lg\">\n<div class=\"article-column__content\">\n<section class=\"wp-block-bigbite-multi-title\">\n<div class=\"container\"><\/div>\n<\/section>\n<p>Popular configuration packages for integrating Prettier with ESLint, the widely used code formatting tools within JavaScript and TypeScript projects, were hijacked after a maintainer fell victim to a phishing scheme.<\/p>\n<p>According to a Socket observation, packages like eslint-config-prettier and eslint-plugin-prettier were compromised hours after the open-source supply chain security firm reported an npm phishing campaign using the <a href=\"https:\/\/socket.dev\/blog\/npm-phishing-email-targets-developers-with-typosquatted-domain\" target=\"_blank\" rel=\"noreferrer noopener\">typosquatted npnjs.com domain<\/a>.<\/p>\n<p>\u201cThe attacker published malicious versions with no corresponding commits or PRs on GitHub,\u201d a Socket blog post explained, \u201cincluding a payload that executes a DLL on Windows via rundll32.\u201d<\/p>\n<p>Socket added that the attackers had published four new versions of eslint-config-prettier by the time of detection.<\/p>\n<h2 class=\"wp-block-heading\"><a><\/a>npm token phished for planting backdoors<\/h2>\n<p>The incident began with an email sent on July 17, impersonating npm support and linking to the look-alike domain npnjs.com. Unaware, the maintainer entered their credentials, giving away their npm token.<\/p>\n<p>Attackers used the token to publish malicious versions 8.10.1,9.1.1,10.1.6, and 10.1.7 of eslint-config-prettier, along with poisoned updates to eslint-plugin-prettier, synckit,@pkgr\/core, and napi-postinstall.<\/p>\n<p>\u201cRegistration emails and maintainer metadata are easily accessible in npm\u2019s package info, which threat actors scrape to build target lists of package maintainers,\u201c the Socket team <a href=\"https:\/\/socket.dev\/blog\/npm-phishing-campaign-leads-to-prettier-tooling-packages-compromise\" target=\"_blank\" rel=\"noreferrer noopener\">said<\/a>. The malicious versions carried an install-script malware targeting Windows machines by loading a malicious node-gyp.dll.<\/p>\n<p>Prettier and ESLint integrations are widely used capabilities with popular tools like Dependabot and Renovate automatically picking up the \u201clatest\u201c versions of packages. CI\/CD pipelines and a number of developers may already have unknowingly installed compromised versions, according to Socket.<\/p>\n<h2 class=\"wp-block-heading\" id=\"automated-github-alarms-triggered-a-quick-response\">Automated GitHub alarms triggered a quick response<\/h2>\n<p>Detection was swift once the updates bypassed GitHub\u2019s usual commit-based alerts and <a href=\"https:\/\/github.com\/prettier\/eslint-config-prettier\/issues\/339\" target=\"_blank\" rel=\"noreferrer noopener\">raised<\/a> red flags in registry logs. The maintainer <a href=\"https:\/\/x.com\/wizardhead\/status\/1946310686243799171\" target=\"_blank\" rel=\"noreferrer noopener\">revoked<\/a> the compromised token, deprecated the malicious releases, and collaborated with npm to remove them.<\/p>\n<p>Socket noted that the attack is a textbook example of \u201cmulti-stage supply chain compromise,\u201d which involves harvesting maintainer credentials, publishing malicious versions on npm, and potentially infecting thousands of projects.<\/p>\n<p>\u201cMore reports of compromised credentials are likely to roll in as attackers target other maintainers, leveraging scraped npm metadata and what has so far proved to be a very convincing automated phishing campaign,\u201d it added.<\/p>\n<p>Developers are recommended to audit lockfiles, clear caches, reinstall clean versions, pin specific package versions, and enable two-factor authentication on npm accounts.<\/p>\n<p>npm, the default package manager for the JavaScript runtime Node.js, has seen increased abuse in recent times, owing to its reach and popularity. Last month, Socket observed two malicious npm packages capable of <a href=\"https:\/\/www.csoonline.com\/article\/4004261\/new-npm-threats-can-erase-production-systems-with-a-single-request.html\">wiping out production systems with a single request<\/a>. Previously, a <a href=\"https:\/\/www.csoonline.com\/article\/3995813\/hackers-drop-60-npm-bombs-in-less-than-two-weeks-to-recon-dev-machines.html\">score of npm packages<\/a> were caught snooping on dev machines in addition to a clever campaign that dropped<a href=\"https:\/\/www.csoonline.com\/article\/3980073\/hackers-booby-trap-npm-with-cross-language-imposter-packages.html\"> typo-squatted packages<\/a> with stealers and RCE codes.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Popular configuration packages for integrating Prettier with ESLint, the widely used code formatting tools within JavaScript and TypeScript projects, were hijacked after a maintainer fell victim to a phishing scheme. According to a Socket observation, packages like eslint-config-prettier and eslint-plugin-prettier were compromised hours after the open-source supply chain security firm reported an npm phishing campaign using the typosquatted npnjs.com domain. \u201cThe attacker published malicious versions&#8230; <\/p>\n<p class=\"more\"><a class=\"more-link\" href=\"https:\/\/newestek.com\/?p=14486\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-14486","post","type-post","status-publish","format-standard","hentry","category-uncategorized","is-cat-link-borders-light is-cat-link-rounded"],"_links":{"self":[{"href":"https:\/\/newestek.com\/index.php?rest_route=\/wp\/v2\/posts\/14486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/newestek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/newestek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/newestek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/newestek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14486"}],"version-history":[{"count":0,"href":"https:\/\/newestek.com\/index.php?rest_route=\/wp\/v2\/posts\/14486\/revisions"}],"wp:attachment":[{"href":"https:\/\/newestek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/newestek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/newestek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}