Live data from Hacker News

Snyk security researcher deploys malicious NPM packages targeting cursor.com

sourcecodered.com

201–210 of 331 posts

Re: Snyk security researcher deploys malicious NPM packages targeting cursor.com

#201
post #43

Earlier quoted context omitted.

Vagrant’s popularity seems to have died down with Docker containers but it’s by far my favorite way to make dev environments. Several years ago I worked somewhere that prohibited web browsers and development tools on laptops. If you needed to use a browser, you’d have to use one over Citrix. If you needed to code, you’d use a VDI or run the tools in a VM. At the time I thought their approach was clinically insane, bu…

Devcontainers[1] are the new incarnation of this pattern. We use them at work and they are a dream for onboarding new developers. The only downside is the VSCode lock-in but if that's a concern there's always DevPod[2]. [1] https://containers.dev/ [2] https://devpod.sh/

It looks like the team behind it have been moving it towards more of an open standard over the last year. There's now a CLI reference implementation, and the Jetbrains IDE's have an implementation for it.

There's also a thread for Zed about a path to implementing it there [0]. Hopefully it'll become a bit more common over 2025.

[0] - https://github.com/zed-industries/zed/issues/11473

Re: Snyk security researcher deploys malicious NPM packages targeting cursor.com

#202

Earlier quoted context omitted.

Can you point to a write-up somewhere that details this setup? Part of the appeals of VMs is that they were built with security as a primary objective. I probably have to do something stupid to break that isolation. A custom ad hoc configuration makes me a bit nervous that I will unknowingly punch a Docker sized hole through my firewall and have less security than if I ran a stock workflow.

For me, I don't use LXD, but use Proxmox containers. These are non-root Linux containers by default. Super lightweight compared to a VM. Proxmox makes managing LXC containers a little easier with a UI, compared to managing containers strictly using command line. If you go this route, create a container template that has everything you want in every instance. And then spin out new containers whenever you need one.

you might be interested in the incus webui

Re: Snyk security researcher deploys malicious NPM packages targeting cursor.com

#203
post #43

Earlier quoted context omitted.

Vagrant’s popularity seems to have died down with Docker containers but it’s by far my favorite way to make dev environments. Several years ago I worked somewhere that prohibited web browsers and development tools on laptops. If you needed to use a browser, you’d have to use one over Citrix. If you needed to code, you’d use a VDI or run the tools in a VM. At the time I thought their approach was clinically insane, bu…

Devcontainers[1] are the new incarnation of this pattern. We use them at work and they are a dream for onboarding new developers. The only downside is the VSCode lock-in but if that's a concern there's always DevPod[2]. [1] https://containers.dev/ [2] https://devpod.sh/

I think vs code is the easiest way to set up dev containers, but once they are created I mostly just shell into them and use neovim!

Re: Snyk security researcher deploys malicious NPM packages targeting cursor.com

#204
post #77

I need to get serious about doing all development inside a virtual machine. One project per VM. There are just too many insidious ways in which I can ignorantly slip up such that I compromise my security. My only solace is that I am a nobody without secrets or a fortune to steal. IDEs, plugins, development utilities, language libraries, OS packages, etc. So much code that I take on blind faith.

The real problem is video performance in VMs. It still just...kind of sucks. Running Cinnamon in a VM is just about impossible to get GL acceleration working properly. nvidia gates it's virtualized GPU offerings behind their enterprise cards, so we're left with ineffective command translation. IMO: I can tolerate just about every other type of VM overhead, but choppy/unresponsive GUIs have a surprisingly bad ergonomi…

But would it matter much for development? Either SSH into the VM and use vi/emacs or use an IDE/editor with remote support. VS Code even lets you use a container as a development environment (I know, not a VM by default):

https://code.visualstudio.com/docs/devcontainers/containers

Re: Snyk security researcher deploys malicious NPM packages targeting cursor.com

#205
post #179

Earlier quoted context omitted.

Sure. They don't include "node_modules" directory in their .gitignore file. So any third party code changes end up in git commits and are easily visible and reviweable. So running npm update/upgrade includes the code that changed in the dependencies in the commit.

Surely there has to be better ways of “vendoring” (including hosting your own package repository that doesn’t automatically pull new versions) than adding thousands or maybe tens of thousands of files to the git repo?

If my podcast memory serves, that's how Isaac (the NPM guy) said it was intended.

You would `npm install` and then `git commit`. That's why npm didn't have a lock file back then. Git was the lock file.

Re: Snyk security researcher deploys malicious NPM packages targeting cursor.com

#206

Earlier quoted context omitted.

It's an unfortunate incentive structure. If you're doing offensive security research, there's two ways you can go about it: you can report the potential vulnerability without exploiting it, in which case you risk the company coming back to you and saying "thanks but we don't consider this a vulnerability because it's only exploited through misconfiguration and we're too smart for that". Maybe you get some token rewar…

You can also console.log those credentials as a PoC, and then show that the console.log could trivially be replaced by a fetch(). Kind of like a lot of exploit PoCs just "pop a calc" (AKA open the Calculator app), not because opening the calculator is valuable to an attacker, but because if you can open calculator, you can do anything.

The problem there though, is that with PoCs like this, as an attacker you want to have a ping back to your system so that you know the attack has been successful (in this case they probably expected/hoped someone at Cursor to install the package, that's the usual objective in a dependency confusion attack). But what they could have done, is send a less sensitive thing like just the current working directory or current effective user, instead of the whole environment.

Re: Snyk security researcher deploys malicious NPM packages targeting cursor.com

#207
post #134

snyk is the same company that instead of rotating oublic keys just… changes them without notice. https://github.com/snyk/cli/pull/5649 They also mark projects as "abandoned" if they move to any other forge that isn't github. And they stay abandoned even if new releases appear on npm/pypi :D Their competence isn't as big as their fame, in my opinion. Also one of their sales people insulted me over email, because appar…

I'm sure you can provide the body of the [appropriately redacted] said email?

I was also sure until I found out that outlook refuses to search old emails.

Re: Snyk security researcher deploys malicious NPM packages targeting cursor.com

#208
post #193

Earlier quoted context omitted.

It's an unfortunate incentive structure. If you're doing offensive security research, there's two ways you can go about it: you can report the potential vulnerability without exploiting it, in which case you risk the company coming back to you and saying "thanks but we don't consider this a vulnerability because it's only exploited through misconfiguration and we're too smart for that". Maybe you get some token rewar…

Cursor does not have a bug bounty though, and its hard to see how this constitutes anything other than a direct attack on them, their users, or both. "The incentive structure made me do it" does not justify acting like a criminal.

> Cursor does not have a bug bounty

Shouldn't this alone be considered criminal negligence at this point? Cursor isn't some random open source project. It's a company that has funding, and subscriptions. Hell, I pay Cursor for a monthly subscription. Pretty incredible that they have no bounty program.

Re: Snyk security researcher deploys malicious NPM packages targeting cursor.com

#210
post #4

Looks like a white hat audit from Snyk testing. Got flagged because oastify.com is a default Burp Collaborator server. They should be running a private npm repo for tests (not difficult to override locally) and also their own collaborator server.

It's not white hat because they actively extract data; if it was just to prove it worked they could've done a console.log, cause npm install to fail, or not extract a payload.

The data they extract is nothing sensitive and this way they can see how many hits they get. The more affected the bigger the headline for them.
Post reply on HN