frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Axios Compromised on NPM – Malicious Versions Drop Remote Access Trojan

https://www.stepsecurity.io/blog/axios-compromised-on-npm-malicious-versions-drop-remote-access-trojan
183•mtud•1h ago

Comments

mtud•1h ago
Supply chain woes continue
kdavis01•1h ago
One more reason to use Fetch
marjipan200•1h ago
until Node is compromised
avaer•52m ago
Harder to do. Also node is not updated at the rate of npm deps.
p1mrx•31m ago
Stop trying to make Fetch happen.
koolba•1h ago
> Both versions were published using the compromised npm credentials of a lead axios maintainer, bypassing the project's normal GitHub Actions CI/CD pipeline.

Doesn’t npm mandate 2FA as of some time last year? How was that bypassed?

bakugo•57m ago
Apparently it's possible to create access tokens that bypass 2FA. Might've been this.

https://docs.npmjs.com/creating-and-viewing-access-tokens

stingraycharles•35m ago
Correct, for CI/CD systems that want to push releases.
marjipan200•1h ago
Incident tracking:

https://github.com/axios/axios/issues/10604

slopinthebag•1h ago
It's reasons like this why I refuse to download Node or use anything NPM. Thankfully other languages are better anyways.
waterTanuki•27m ago
Because no other language has ever had supply chain attacks ever, in history. Nope.

https://blog.rust-lang.org/2022/05/10/malicious-crate-rustde...

https://en.wikipedia.org/wiki/Log4Shell

https://blog.pypi.org/posts/2024-12-11-ultralytics-attack-an...

https://about.gitlab.com/blog/gitlab-catches-mongodb-go-modu...

https://www.reversinglabs.com/blog/packagist-php-repo-supply...

mememememememo•5m ago
C++ ftw
8cvor6j844qw_d6•1h ago
Should increase the delay to dependency updates.
tonymet•57m ago
Slow Russian roulette is still a losing strategy
btown•40m ago
It’s only a losing strategy if you assume everyone universally adopts the slow strategy, and no research teams spot it in the interim. For things with large splash radius, that’s unrealistic, so defenders have an information advantage.

Makes actual security patches tougher to roll out though - you need to be vigilant to bypass the slowdown when you’re actually fixing a critical flaw. But nobody said this would be easy!

esseph•20m ago
> Makes actual security patches tougher to roll out though

Yeah. 7 days in 2026 is a LONG TIME for security patches, especially for anything public facing.

Stuck between a rock (dependency compromise) and a hard place (legitimate security vulnerabilities).

Doesn't seem like a viable long-term solution.

neko_ranger•39m ago
but wouldn't it work in this case? sure if a package was compromised for months/years it wouldn't save you

but tell dependabot to delay a week, you'd sleep easy from this nonesense

jadar•1h ago
How much do you want to bet me that the credential was stolen during the previous LiteLLM incident? At what point are we going to have to stop using these package managers because it's not secure? I've got to admit, it's got me nervous to use Python or Node.js these days, but it's really a universal problem.
rybosome•50m ago
> it’s got me nervous to use Python or Node.js these days

My feelings precisely. Min package age (supported in uv and all JS package managers) is nice but I still feel extremely hesitant to upgrade my deps or start a new project at the moment.

I don’t think this is going to stabilize any time soon, so figuring out how to handle potentially compromised deps is something we will all need to think about.

Tazerenix•24m ago
NPM only gained minimum package age in February of this year, and still doesn't support package exclusions for internal packages.

https://github.com/npm/cli/pull/8965

https://github.com/npm/cli/issues/8994

Its good that that they finally got there but....

I would be avoiding npm itself on principle in the JS ecosystem. Use a package manager that has a history of actually caring about these issues in a timely manner.

h4ch1•56m ago
I can't even imagine the scale of the impact with Axios being compromised, nearly every other project uses it for some reason instead of fetch (I never understood why).

Also from the report:

> Neither malicious version contains a single line of malicious code inside axios itself. Instead, both inject a fake dependency, plain-crypto-js@4.2.1, a package that is never imported anywhere in the axios source, whose only purpose is to run a postinstall script that deploys a cross-platform remote access trojan (RAT)

Good news for pnpm/bun users who have to manually approve postinstall scripts.

beart•50m ago
> nearly every other project uses it for some reason instead of fetch (I never understood why).

Fetch wasn't added to Node.js as a core package until version 18, and wasn't considered stable until version 21. Axios has been around much longer and was made part of popular frameworks and tutorials, which helps continue to propagate it's usage.

seer•45m ago
Also it has interceptors, which allow you to build easily reusable pieces of code - loggers, oauth, retriers, execution time trackers etc.

These are so much better than the interface fetch offers you, unfortunately.

reactordev•38m ago
You can do all of that in fetch really easily with the init object.

   fetch('https://api.example.com/data', {
  headers: {
    'Authorization': 'Bearer ' + accessToken
  }
})
mhio•3m ago
[delayed]
meekins•33m ago
It also supports proxies which is important to some corporate back-end scenarios
nathanmills•20m ago
fetch supports proxies
martmulx•32m ago
Does pnpm block postinstall on transitive deps too or just top-level? We have it configured at work but I've never actually tested whether it catches scripts from packages that get pulled in as sub-dependencies.
dawnerd•13m ago
From what I can tell, it blocks it everywhere.
eviks•28m ago
> Good news for pnpm/bun users who have to manually approve postinstall scripts.

Would they not have approved it for earlier versions? But also wouldn't the chance of addition automatic approval be high (for such a widely used project)?

tonymet•56m ago
Has anyone tested general purpose malware detection on supply chains ? Like clamscan . I tried to test the LiteLLM hack but the affected packages had been pulled. Windows Defender AV has an inference based detector that may work when signatures have not yet been published
esseph•19m ago
> Has anyone tested general purpose malware detection on supply chains ? Like clamscan

You could use Trivy! /s

jesse_dot_id•6m ago
I second this question. I usually scan our containers with snyk and guarddog, and have wondered about guarddog in particular because it adds so much build time.
postalcoder•31m ago
PSA: npm/bun/pnpm/uv now all support setting a minimum release age for packages.

I also have `ignore-scripts=true` in my ~/.npmrc. Based on the analysis, that alone would have mitigated the vulnerability. bun and pnpm do not execute lifecycle scripts by default.

Here's how to set global configs to set min release age to 7 days:

  ~/.config/uv/uv.toml
  exclude-newer = "7 days"

  ~/.npmrc
  min-release-age=7 # days
  ignore-scripts=true
  
  ~/Library/Preferences/pnpm/rc
  minimum-release-age=10080 # minutes
  
  ~/.bunfig.toml
  [install]
  minimumReleaseAge = 604800 # seconds
(Side note, it's wild that npm, bun, and pnpm have all decided to use different time units for this configuration.)

If you're developing with LLM agents, you should also update your AGENTS.md/CLAUDE.md file with some guidance on how to handle failures stemming from this config as they will cause the agent to unproductively spin its wheels.

mhio•4m ago
and for yarn berry

    ~/.yarnrc.yml
    npmMinimalAgeGate: "3d"
0x500x79•27m ago
Pin your dependencies folks! Audit and don't upgrade to every version.
onion2k•6m ago
But also have a regular review of your dependencies to update them when necessary, because as bad as compromised packages may be things do have vulnerabilities occasionally, and upgrading things that are a long way out-of-date can be quite hard.
himata4113•27m ago
I recommend everyone to use bwrap if you're on linux and alias all package managers / anything that has post build logic with it.

I have bwrap configured to override: npm, pip, cargo, mvn, gradle, everything you can think of and I only give it the access it needs, strip anything that is useless to it anyway, deny dbus, sockets, everything. SSH is forwarded via socket (ssh-add).

This limits the blast radius to your CWD and package manager caches and often won't even work since the malware usually expects some things to be available which are not in a permissionless sandbox.

You can think of it as running a docker container, but without the requirement of having to have an image. It is the same thing flatpak is based on.

As for server deployments, container hardening is your friend. Most supply chain attacks target build scripts so as long as you treat your CI/CD as an untrusted environment you should be good - there's quite a few resources on this so won't go into detail.

Bonus points: use the same sandbox for AI.

Stay safe out there.

imrozim•26m ago
the self-deletion after execution is the scary part it replaces its own package.json with a clean version to evade detection. if you ran npm install before this was caught you'd have no obvious trace left. the lesson here is that pinning exact versions isn't enough you need integrity checks on the actual published content not just the version number. npm install --ignore-scripts in CI should honestly be the default.
joshuat•18m ago
Why would pinning the exact version in this case not have solved the problem? I agree `--ignore-scripts` would be a sensible default at this point, but my understanding is that this vulnerability exclusively impacts two newly released versions.
bakugo•16m ago
You're replying to an AI bot.
jmward01•24m ago
This may not be popular, but is there a place for required human actions or just timed actions to slow down things like this? For instance, maybe a GH action to deploy requires a final human click and to change that to cli has a 3 day cooling period with mandatory security emails sent out. Similarly, you switch to read only for 6 hrs after an email change. There are holes in these ideas but the basic concept is to treat security more like physical security, your goal isn't always to 100% block but instead to slow an attacker for xxx minutes to give the rest of the team time to figure out what is going on.
ArcHound•15m ago
Hi, security here. We've tried, but the amount of people you need for this vs the amount of people you have trying to review and click the big button always means that this step will be a bottleneck. Thus this step will be eliminated.

A much better approach would be to pin the versions used and do intentional updates some time after release, say a sprint after.

jmward01•6m ago
Yeah, I am looking at that on the use end. It sounds like on the python side this type of thing will be more standard (uv now and soon pip supported with version date requirements). I think time is a big missing element in many security in depth decisions. It can be time until you adopt like use no package newer than xx days or time it takes to deploy etc etc. Unfortunately the ecosystem is getting really diverse and that means ever more sophisticated attacks so we may need to do things that are annoying just to survive.
bluepeter•22m ago
Min release age sucks, but we’ve been here before. Email attachments used to just run wild too, then everyone added quarantine delays and file blocking and other frictions... and it eventually kinda/sorta worked. This does feel worse, though, with fewer chokepoints and execution as a natural part of the expectation.

Edit: bottom line is installs are gonna get SOOO much more complicated. You can already see the solution surface... Cooling periods, maintainer profiling, sandbox detonation, lockfile diffing, weird publish path checks. All adds up to one giant PITA for fast easy dev.

0x1ceb00da•22m ago
Coded has zero nom dependencies. Neat!
dhruv3006•19m ago
174025 dependents.
rtpg•8m ago
Please can we just have a 2FA step on publishing? Do we really need a release to be entirely and fully automated?

It won't stop all attacks but definitely would stop some of these

wps•5m ago
Genuinely how are you supposed to make sure that none of the software you have on your system pulls this in?

It’s things like this that make me want to swap to Qubes permanently, simply as to not have my password manager in the same context as compiling software ever.

woeirua•5m ago
Supply chain attacks are so scary that I think most companies are going to use agents to hard fork their own versions of a lot of these core libraries instead. It wasn’t practical before. It’s definitely much more doable today.
franciscop•5m ago
I wrote a 2kb Axios alternative, `fch`, in case this makes anyone want to jump over:

https://www.npmjs.com/package/fch

You can now run a full Linux operating system inside a 6mb PDF

https://twitter.com/oliviscusAI/status/2038563166431346865
1•matthewsinclair•3m ago•0 comments

Show HN: Provero – Data quality checks in YAML, compiled to single SQL queries

https://github.com/provero-org/provero
1•andreahlert•3m ago•0 comments

Office EU: European-owned cloud based office suite

https://office.eu
1•koenraad•3m ago•0 comments

Tokens Are the New Oil: How China Is Quietly Winning the AI Economy

https://thamizhelango.medium.com/tokens-are-the-new-oil-how-china-is-quietly-winning-the-ai-econo...
1•KnuthIsGod•5m ago•0 comments

The United States has become a rogue state

https://www.washingtonpost.com/ripple/2026/03/26/united-states-trump-rogue-state-iran/
1•hkhn•6m ago•0 comments

Show HN: Tiny Axios Alternative, Fch

https://www.npmjs.com/package/fch
1•franciscop•6m ago•0 comments

Our AI traced the axios NPM attack and found how the payload hid itself

https://app.strix.ai/share/chats/NDIxNzZiMTItZWQ2My00NDY4LWIzYzUtNDEyZDgyMWI1YjYzLm1uZTJldnQ0LkVt...
1•ahmedallam2•6m ago•0 comments

What is 'tokenomics' and how would China gain the edge

https://www.scmp.com/tech/big-tech/article/3347495/how-china-could-dominate-ai-eras-tokenomics-va...
1•KnuthIsGod•6m ago•0 comments

Delve – Fake Compliance as a Service – Part II

https://substack.com/home/post/p-192665132
1•theahura•9m ago•0 comments

California to impose new AI regulations in defiance of Trump call

https://www.theguardian.com/us-news/2026/mar/30/california-ai-regulations-trump
1•thm•10m ago•0 comments

Anthropic, The Pentagon, and the Future of Autonomous Weapons

https://www.bloomberg.com/news/articles/2026-03-28/anthropic-s-fight-with-us-military-over-future...
1•KnuthIsGod•11m ago•1 comments

Show HN: An AI Operating System

https://getariaos.com/
1•juniormpakou•19m ago•1 comments

Archive review: a gorgeous sci-fi movie that fails the Black Mirror test (2020)

https://www.polygon.com/2020/7/10/21320614/archive-review-vod-movie-theo-james-stacy-martin-westw...
1•walterbell•19m ago•0 comments

What to Know About California's Executive Order on A.I

https://www.nytimes.com/2026/03/30/technology/california-ai-executive-order.html
2•y1n0•20m ago•0 comments

Tropical geckos are more adaptable than we thought

https://phys.org/news/2026-03-tropical-geckos-australia-thought.html
1•y1n0•21m ago•0 comments

Purple Lifeform Photographed Sprouting 'Tentacles' on the ISS

https://www.sciencealert.com/purple-lifeform-photographed-sprouting-tentacles-on-the-iss
2•y1n0•21m ago•0 comments

Pairs of atoms observed existing in two places at once for the first time

https://phys.org/news/2026-03-pairs-atoms.html
1•arunc•23m ago•0 comments

Americans Have Never Been All That Excited About Going to the Moon

https://www.nytimes.com/2026/03/30/science/nasa-astronauts-moon-americans-mood.html
2•mmooss•23m ago•0 comments

Claude usage limits hitting faster than expected

https://old.reddit.com/r/ClaudeCode/comments/1s7zg7h/investigating_usage_limits_hitting_faster_than/
5•Austin_Conlon•24m ago•0 comments

The mindbending 'cyberpunk city' in China that exists on so many levels

https://www.cnn.com/travel/chongqing-china-tourism-cyberpunk-city-intl-hnk
2•1659447091•26m ago•0 comments

AI Tools Directory – Verified Anti-Hallucination SEO Tools – LogicBalls

https://logicballs.com
1•mohitsingh01•28m ago•0 comments

How fast can algorithms advance capabilities?

https://epoch.ai/gradient-updates/how-fast-can-algorithms-advance-capabilities
1•jxmorris12•29m ago•0 comments

Vaping likely to cause lung and oral cancer, Australian researchers find

https://www.theguardian.com/australia-news/2026/mar/31/vaping-lung-cancer-risk
1•sandebert•29m ago•0 comments

Artemis II mission countdown clock started

https://www.nasa.gov/blogs/missions/2026/03/30/nasas-artemis-ii-launch-mission-countdown-begins/
3•d_silin•32m ago•0 comments

Naive (YC S25) forked a 41K-star MIT project and is selling it as their own

https://not-so-naive.vercel.app
3•not-chatgpt•34m ago•0 comments

Show HN: A shot tracking app for hockey teams

https://github.com/dvelton/hockey-shot-tracker
3•deevelton•40m ago•1 comments

Supply Chain Attack on Axios Pulls Malicious Dependency from NPM

https://socket.dev/blog/axios-npm-package-compromised
1•dsr12•41m ago•0 comments

HK police can now demand phone passwords under new national security rules

https://www.bbc.com/news/articles/ce8j9yj52lro
4•jen729w•41m ago•1 comments

Semantic – Reducing LLM "Agent Loops" by 27.78% via AST Logic Graphs

https://github.com/concensure/Semantic
16•concensure•47m ago•0 comments

Ask HN: Gemini CLI vs. Claude Code

3•elC0mpa•48m ago•0 comments