Edit 2025-04-09 16:42Z - article was updated with a tenth package (Prettier - Code)

A set of ten VSCode extensions on Microsoft’s Visual Studio Code Marketplace pose as legitimate development tools while infecting users with the XMRig cryptominer for Monero.

ExtensionTotal researcher Yuval Ronen has uncovered ten VSCode extensions published on Microsoft’s portal on April 4, 2025.

The package names are:

  1. Prettier - Code for VSCode (by prettier) - 486K installs
  2. Discord Rich Presence for VS Code (by Mark H) - 189K installs
  3. Rojo – Roblox Studio Sync (by evaera) - 117K installs
  4. Solidity Compiler (by VSCode Developer) - 1.3K installs
  5. Claude AI (by Mark H)
  6. Golang Compiler (by Mark H)
  7. ChatGPT Agent for VSCode (by Mark H)
  8. HTML Obfuscator (by Mark H)
  9. Python Obfuscator for VSCode (by Mark H)
  10. Rust Compiler for VSCode (by Mark H)
  • Ben Matthews@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    1
    ·
    1 month ago

    Such tricks were was predictable, as VSCode extensions, letting arbitrary JS run on your system, are an obvious security risk.
    Recently I used Zed editor instead, it’s smooth, but this also has extensions, only these are fewer and in rust ( maybe a higher barrier, targeting less users, so far… ). What’s the solution here - is there some intrinsically safer sandboxed system ?

    • calcopiritus@lemmy.world
      link
      fedilink
      arrow-up
      13
      ·
      1 month ago

      The more sandboxed the extension system, the less powerful it is.

      You either have an entity that approves of extensions. Or your users have to be very careful and trusting of other people. There’s no other way.

    • brian@programming.dev
      link
      fedilink
      arrow-up
      5
      ·
      1 month ago

      I can’t imagine a sandbox would help. what can an an extension do that doesn’t touch some arbitrary code that gets run? it could add a line to the middle of a giant file right before you run and remove it immediately after. even if you run the whole editor in a sandbox you do eventually deploy that code somewhere, it can change something inconspicuous like a url in a dependency file that might not get caught in a pr

      the only solution is to audit everything you install, know all the code you run, etc. ofc that’s not reasonable, but idk what else there is. better automated virus check things maybe? identity verification for extension publishers? idk if there’s an actual solution

      • Ben Matthews@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 month ago

        It seems so far Zed is cautious, providing api only for specific extensions - i.e. language servers and gui themes.

        add a line … right before you run it

        I run stuff from the command line using a trusted build tool (Mill, in scala), or via a local server (where js is sandboxed).
        But indeed, a tricky language server or AI tool (I don’t use yet) might inject code where I don’t inspect before running it. That’s a risk even with java-based IDEs - java has security permissions, not in js (vscode) or rust (zed), but are they applied…? As for audits, a problem with vscode is the marketplace got too big, so many extensions, many lookalikes, nobody can check them all…

      • Jakeroxs@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        1 month ago

        Might be one thing AI tools will be super useful for, if it’s possible to teach it what types of code are potentially malicious and able to automatically flag it for review AT LEAST.

    • passenger@lemm.ee
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      1 month ago

      Just that? An open source HTML minifier probably bundled with a miner.

      • shnizmuffin@lemmy.inbutts.lol
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 month ago

        Minification isn’t the same as obfuscation, though. The only way I can think to obfuscate HTML would be to replace every element with a custom element.

        • passenger@lemm.ee
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          1 month ago

          That is true!

          But one could make up all kinds of tactics. Especially with the help of css styles inside the document. For example: add random crap, make it invisible. Make the real content hard to see or find in the document. Why though? I don’t know! Now I am kind of curious to know what it did, if anything.

    • zygo_histo_morpheus@programming.dev
      link
      fedilink
      arrow-up
      7
      ·
      1 month ago

      Don’t think it has anything to do with electron. VSCode is just the largest editor that people install extensions for, so it’s what makes the most sense to write malware for. If vim was more popular, I’m sure there would be more crypto mining extensions for that (I wonder how many there are? Surely more than zero?)