News for hackers. Stuff that matters.
Re:Nx compromised: malware uses Claude code CLI to explore t... by JdeBP on Wednesday August 27, 2025 @08:55AM (#45038993)
> Are you using a compromised version of nx?

> Run semgrep --config [...]

> Alternatively, you can run nx –version [...]

Have we not learned, yet? The number of points this submission has already earned says we have not.

People, do not trust security advisors who tell you to do such things, especially ones who also remove the original instructions entirely and replace them with instructions to run their tools instead.

The original security advisory is at https://github.com/nrwl/nx/security/advisories/GHSA-cxm3-wv7... and at no point does it tell you to run the compromised programs in order to determine whether they are compromised versions. Or to run semgrep for that matter.

Re:Nx compromised: malware uses Claude code CLI to explore t... by DetroitThrow on Wednesday August 27, 2025 @11:04AM (#45040706)
@dang Even though the blogpost has some helpful flavor, this GH issue seems much more direct and giving much more straightforward guidance for resolving the issue. Is it possible to change the link?
Re:Nx compromised: malware uses Claude code CLI to explore t... by JdeBP on Wednesday August 27, 2025 @11:35AM (#45041142)
Credit to otterly and Hilift for finding some other better coverage than this semgrep page as well:

* https://news.ycombinator.com/item?id=45040126

* https://news.ycombinator.com/item?id=45040507

Re:Nx compromised: malware uses Claude code CLI to explore t... by merb on Wednesday August 27, 2025 @12:25PM (#45041766)
I do not like these coverages. They always write about VSCode Extension which has basically nothing todo with the bug.

It only did run affected programs of course but it's so stupid to even talk about vscode in that case. if you used the affected nx versions you are affected no matter if you used vscode,webstorm, whatever ide of your liking. if you used a not affected nx version nothing happend no matter which vscode version you used.

Re:Nx compromised: malware uses Claude code CLI to explore t... by ramimac on Wednesday August 27, 2025 @01:31PM (#45042494)
Hi! Author here who added the VSCode stat :)

I thought it was useful to include because:

* it can inform triage, if you use the extension you're more likely to be impacted * because it was VSCode, Workplace Trust actually partially mitigated this in at least 38 cases

Re:Nx compromised: malware uses Claude code CLI to explore t... by merb on Wednesday August 27, 2025 @02:04PM (#45042936)
The vocoder extension does not contain any affected packages, it‘s just misleading
Re:Nx compromised: malware uses Claude code CLI to explore t... by dang on Wednesday August 27, 2025 @01:43PM (#45042648)
(We detached this subthread from https://news.ycombinator.com/item?id=45038993.)

I found the first submission on the story (https://news.ycombinator.com/item?id=45034496), which used a github url, and merged the thread into it - more explanation at https://news.ycombinator.com/item?id=45042727.

Re:Nx compromised: malware uses Claude code CLI to explore t... by pastel8739 on Wednesday August 27, 2025 @11:55AM (#45041384)
What exactly are “such things” that should cause us not to trust? Executing programs?
Re:Nx compromised: malware uses Claude code CLI to explore t... by ezfe on Wednesday August 27, 2025 @12:08PM (#45041549)
Don't use the hacked program to check if it's hacked! For starters, it can lie.
Re:Nx compromised: malware uses Claude code CLI to explore t... by dudeinjapan on Wednesday August 27, 2025 @09:02AM (#45039083)
Are you affected? Run the affected program. OK, now you are definitely affected.
Re:Nx compromised: malware uses Claude code CLI to explore t... by baxtr on Wednesday August 27, 2025 @11:47AM (#45041280)
It might be even better than that:

Create a blog post about a security issue. Post it on HN get upvotes. Find people who believe they might be affected. Let them run the affected program. Boom.

Re:Nx compromised: malware uses Claude code CLI to explore t... by ghurtado on Wednesday August 27, 2025 @12:24PM (#45041752)
Either I've grown old and bitter enough that I think this is likely the case, or this is just a rational take and most likely what happened.

I'm not sure which is worse.

Re:Nx compromised: malware uses Claude code CLI to explore t... by littlecranky67 on Wednesday August 27, 2025 @09:13AM (#45039230)
Says the malware is in a post-install script - that will not be called by nx, but i.e after an npm install
Re:Nx compromised: malware uses Claude code CLI to explore t... by reactordev on Wednesday August 27, 2025 @10:22AM (#45040135)
Consider anything pre or post attached to the package as tainting the package.
Re:Nx compromised: malware uses Claude code CLI to explore t... by SoftTalker on Wednesday August 27, 2025 @10:28AM (#45040219)
Consider your entire system tainted, nothing is trustworthy at this point. Wipe and rebuild from known good media.
Re:Nx compromised: malware uses Claude code CLI to explore t... by littlecranky67 on Wednesday August 27, 2025 @11:22AM (#45040954)
The malware is "luckily" written in javascript and such quite easy to analyse. No manipulation outside of .zshrc or .bashrc and a temp txt file.
Re:Nx compromised: malware uses Claude code CLI to explore t... by tsukikage on Wednesday August 27, 2025 @12:42PM (#45041971)
That's what the code you can see now does. It may or may not be the same as what ran.
Re:Nx compromised: malware uses Claude code CLI to explore t... by littlecranky67 on Wednesday August 27, 2025 @02:54PM (#45043530)
Nope, because the script was commited to upstream and you can review what ended in the package.

It seems a lot of general "wisdom" here is thrown by people who have not looked into this particular incident or are unfamiliar with js node dev in general.

Re:Nx compromised: malware uses Claude code CLI to explore t... by reactordev on Wednesday August 27, 2025 @04:35PM (#45044858)
Correct, luckily, but all it takes is one eval. So be diligent about checking. However, like you said, luckily it’s JavaScript and there’s a history online that you can see.

Be weary of binary wasms though, harder to analyze. In the end, because it was published and npm allows you to see the history, we can all see.

Still, from a security standpoint, anything within a “package” that is compromised, compromises the package. Don’t install it. Wait for the fix.

Re:Nx compromised: malware uses Claude code CLI to explore t... by tempaccount420 on Thursday August 28, 2025 @01:13AM (#45048628)
WASM should be easier to analyze since you can't look at what functions the WASM imports to do side-effects.
Re:Nx compromised: malware uses Claude code CLI to explore t... by dudeinjapan on Wednesday August 27, 2025 @11:26AM (#45041022)
Oh good. I guess running the actual program was too many steps.
Re:Nx compromised: malware uses Claude code CLI to explore t... by pharrington on Wednesday August 27, 2025 @10:45AM (#45040461)
Yeah. The blogpost reads like a confession. It's very strange.
[dead]
Re:Nx compromised: malware uses Claude code CLI to explore t... by dpoloncsak on Wednesday August 27, 2025 @09:07AM (#45039150)
What does Google or Antropic have to do with anything here? NX was compromised. Threat actors are using this access to leverage CLI LLMs to search the computer for you. Is this any different than if they just ran a big /find?

Should the AI Assistant NOT reply to the request it was given? Why shouldn't it?

Re:Nx compromised: malware uses Claude code CLI to explore t... by wat10000 on Wednesday August 27, 2025 @09:15AM (#45039259)
They’re essentially being used as a programming language interpreter. This attack could easily have been done with Python or Ruby or Perl. There can’t be a realistic expectation that these tools are robust against malicious input. You have to either sandbox them or keep malicious input away from them.
Re:Nx compromised: malware uses Claude code CLI to explore t... by echelon on Wednesday August 27, 2025 @09:32AM (#45039442)
> Should the AI Assistant NOT reply to the request it was given? Why shouldn't it?

LLMs are not a dumb interpreter. At minimum, they are a client-server architecture that can be used as a control plane. But they are much more than that and can likely employ advanced detection and classification heuristics.

The vendors have the capability of (1) stopping this in its tracks, (2) understanding the extent of the attack and notifying customers, (3) studying the breadth of approaches used (4) for future, more ambitious attacks, monitoring them live as threat actors explore systems.

Google and Anthropic absolutely have responsibility here and must devote resources to this.

I am shocked that this is being met with such hostility. I cannot picture a world where LLM vendors are not responsible for making a best attempt at safeguarding their customers. Especially as they seek to have a greater role in business and financial automation.

I've worked at fintechs and we had to go out of our way to look out for our customers. We purchased compromised password and email lists and scanned for impacted customers. Our business didn't cause the data breaches, but we viewed it as our responsibility to protect customers.

Google and Anthropic have the greatest opportunity to make a difference here.

* THIS IS ABSOLUTELY A SEV0 FOR GOOGLE AND ANTHROPIC *:

While it's not a systems outage, it has incredible potential to shape future business and market sentiment. There are going to be major articles written about this in every publication you can think of. Publications that business decision makers read. Forbes, the New York Times, Business Insider. And Google and Anthropic are going to want to own their blurb and state that they acted fast and responsibly. If they're lucky, they can even spin this as an opportunity.

This is the difference between LLMs being allowed in the business workplace and being met with increasing scrutiny. (Not that they shouldn't be scrutinized, but that this incident will overwhelmingly shape the future of the decision envelope.)

Re:Nx compromised: malware uses Claude code CLI to explore t... by zingababba on Wednesday August 27, 2025 @11:31AM (#45041071)
Re:Nx compromised: malware uses Claude code CLI to explore t... by octo888 on Wednesday August 27, 2025 @09:06AM (#45039132)
A single top-level comment would suffice. No need to reply to various comments with the same kind of message
Re:Nx compromised: malware uses Claude code CLI to explore t... by echelon on Wednesday August 27, 2025 @09:29AM (#45039405)
My first two comments in this thread were my initial reaction to what was happening.

I made the above, longer form post to hopefully grab the attention of Google and Anthropic folks. My top-level posts always fall to the very bottom of the page.

Google and Anthropic need to be tracking this.

Re:Nx compromised: malware uses Claude code CLI to explore t... by arcfour on Wednesday August 27, 2025 @09:57AM (#45039784)
Don't forget to file a bug report with the maintainers of Python, Bash, Node, Perl, Ruby, etc. that their interpreters can be used maliciously if given malicious code to execute.
Re:Nx compromised: malware uses Claude code CLI to explore t... by echelon on Wednesday August 27, 2025 @10:08AM (#45039944)
I already posted my rationale here [1], but I have since enhanced it to focus more on the business impact to Google and Anthropic.

YC startups: there's a business opportunity for you lurking in here.

[1] https://news.ycombinator.com/item?id=45039442

Re:Nx compromised: malware uses Claude code CLI to explore t... by neuroo on Wednesday August 27, 2025 @12:49PM (#45042038)
Hi. Co-author of the post here.

Good callout. Evidence so far points to `nx --version` itself being safe because this was in a post-install script but we changed the rec in our post.

We took the versions in the Github security advisory and compiled it into a Semgrep rule which is MIT-licensed: https://semgrep.dev/c/r/oqUk5lJ/semgrep.ssc-mal-resp-2025-08.... Semgrep rules can be overkill for these use cases but it can be convenient to have a single command to check for all affected versions across multiple packages, especially for our users who already have Semgrep installed. That's basically what I did on all our internal repos.

We updated the blog post to note the Semgrep rule is MIT licensed. And you can run locally with Semgrep (which is LGPL: https://github.com/returntocorp/semgrep) if you curl it and run `semgrep --config=rule.yaml`

Re:Nx compromised: malware uses Claude code CLI to explore t... by pharrington on Wednesday August 27, 2025 @03:53PM (#45044321)
did you mean to link to https://github.com/semgrep/semgrep instead?