Skip to content
DevMeme
6484 of 7590
Security Post #7109 · source on Telegram

Massive npm Supply Chain Compromise Hits Packages With 2 Billion Weekly Downloads

Description

A LinkedIn post screenshot from Mackenzie Jackson (Developer and Security Advocate) posted 2 hours ago with urgent warning about the largest supply chain compromise in npm, Inc. history. Packages with a total of 2 billion weekly downloads were turned malicious. The post lists 19 compromised packages with their weekly download counts: ansi-styles (371.41m), debug (357.6m), backslash (0.26m), chalk-template (3.9m), supports-hyperlinks (19.2m), has-ansi (12.1m), simple-swizzle (26.26m), color-string (27.48m), error-ex (47.17m), color-name (191.71m), is-arrayish (73.8m), slice-ansi (59.8m), color-convert (193.5m), wrap-ansi (197.99m), ansi-regex (243.64m), supports-color (287.1m), strip-ansi (261.17m), and chalk (299.99m). The post ends with 'I'll give a more detailed post later...' with a grimacing emoji

Comments

40
Anonymous ★ Top Pick Your node_modules folder was already a black hole of untrusted code, now it's just officially compromised instead of theoretically compromised
  1. Anonymous ★ Top Pick

    Your node_modules folder was already a black hole of untrusted code, now it's just officially compromised instead of theoretically compromised

  2. Anonymous

    I see my entire dependency tree is on this list. On the bright side, my node_modules folder finally has a single, unified purpose: exfiltrating my data

  3. Anonymous

    Remember when we worried about our k8s control plane being the single point of failure? Turns out it was strip-ansi’s preinstall script all along

  4. Anonymous

    The real supply chain attack was the 18 layers of color formatting dependencies we accumulated along the way - because apparently printing red text in a terminal requires more packages than launching a space shuttle

  5. Anonymous

    When your entire dependency tree turns malicious and you realize that 'chalk' wasn't just for making your console output pretty - it was for writing your infrastructure's obituary. Nothing says 'modern JavaScript development' quite like discovering that the package responsible for coloring your terminal text now has more access to your production environment than your actual security team

  6. Anonymous

    Dependency injection meets supply chain infection: npm's way of keeping your node_modules fresh... with malware

  7. Anonymous

    Every “largest npm compromise ever” ends the same: leadership asks if we use chalk, and I explain we don’t - our 37 transitive deps do - so the only thing it actually colored was my 3am pager

  8. Anonymous

    Nothing reveals your architecture like a supply‑chain scare: “Not affected” - until the SBOM shows chalk via 73 transitives; see you on the 3 a.m. bridge

  9. dev_meme 11mo

    https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised

    1. @pyrothefuck 11mo

      good thing we don't update our deps

  10. @Adamus1red 11mo

    https://github.com/debug-js/debug/issues/1005#issuecomment-3266868187

  11. @feralape 11mo

    Just don't use JavaScript

    1. @NaNmber 11mo

      just don't open any website

      1. @jtoming830 11mo

        Or e.g. Slack at all coz it's desktop app is written on Electron

      2. @feralape 11mo

        I don't only rss for me

      3. @wishmeluckplease 11mo

        just don’t use internet, it might be dangerous

      4. @seyfer 11mo

        Just don't

    2. @Agent1378 11mo

      Just use core libraries only and maybe also some big well known libraries like DB client and shit. Stop use libraries with 100 lines that do absolutely trivial things, write it yourself.

      1. dev_meme 11mo

        Doesn't work like this Dependendecies that were infected are dependencies of your dependencies, something you have to work hard to protect against within your entire organization

      2. @TheFloofyFloof 11mo

        why have every library reimplement the same feature when you can import it?

        1. @Agent1378 11mo

          Because if you can't trust the code you mustn't use it. We kind of have to trust the language itself and big libraries that are bundled or well known. Trusting some random shit from random people - is simply dangerous. The "source is open someone will check it" paradigm isnt working in these amounts of code.

  12. @ASCENDEDPULSAR 11mo

    Well, for those who are sleepy heads and wants to hear TLDR. - Yes those packages we infected. - It only runs inside your browser if launched frontend code with infected package. - Infected packages were only pushed as `latest`\new release tags - Infected packages were active only for a short perioud of time: 2.5~ hours - It could have affected your build only if you tried to install one of those packages directly with npm install during this timeframe - It's true that you might have those packages installed as dependencies inside package-lock.json but they are import with sha256 hash, it means that even if hacked package tries to override all tags inside registry it still shouldn't affect you Correct me if I am wrong Good night everyone and have a nice sleep

  13. @feralape 11mo

    Js plebs stay mad and have a v8

  14. @glatavento 11mo

    According to the standards of python, rust, c++, or any other sane language, js just simply doesn't have a so-called core library.

    1. @Agent1378 11mo

      Well, lol

  15. @glatavento 11mo

    Deno do have a std which I literally saw zero people using.

  16. Deleted Account 11mo

    Wow, the hacker has been damaged to core, Nice and interesting! 👏

  17. @mihanizzm 11mo

    And use six remaining values for different kind of flags

  18. @SamsonovAnton 11mo

    Thanks god is-even and is-odd are safe! 😅

  19. @neopulsar 11mo

    And people asking why enterprise store everything on its own arficatories and you go trough 3 circles of hell to bump package version in lock file. I guess that’s why

  20. @gmayv 11mo

    Never used any of those. Christ is King.

    1. @Broken_Cloud_1 11mo

      They live somewhere in your node_modules

      1. @gmayv 11mo

        I'm not falling for that demoralization campaign.

  21. @ZgGPuo8dZef58K6hxxGVj3Z2 11mo

    This is why I write everything I can myself or use the OS's APIs

    1. @gmayv 11mo

      That's also why you are unemployable

      1. @ZgGPuo8dZef58K6hxxGVj3Z2 11mo

        I am exployed but privately I dont use 92737 dependencies just for a calculator app

        1. @RiedleroD 11mo

          you're employed? hey um reminder that you still owe me 160€ >:P

  22. @RiedleroD 11mo

    ✅ just write it yourself you lazy bastard

  23. @RiedleroD 11mo

    exactly

  24. @sysoevyarik 11mo

    "package manager is a convenience that every language must have" incident

Use J and K for navigation