<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: LuzAramburo</title>
    <description>The latest articles on Forem by LuzAramburo (@luzaramburo).</description>
    <link>https://forem.com/luzaramburo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2012768%2F14423414-8bc0-4ffb-bf86-ac9d29ebccce.jpeg</url>
      <title>Forem: LuzAramburo</title>
      <link>https://forem.com/luzaramburo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/luzaramburo"/>
    <language>en</language>
    <item>
      <title>Supply Chain Attacks Aren't Just a Big Library Problem — Here's What You Can Do Today</title>
      <dc:creator>LuzAramburo</dc:creator>
      <pubDate>Mon, 18 May 2026 22:38:09 +0000</pubDate>
      <link>https://forem.com/luzaramburo/supply-chain-attacks-arent-just-a-big-library-problem-heres-what-you-can-do-today-1jbg</link>
      <guid>https://forem.com/luzaramburo/supply-chain-attacks-arent-just-a-big-library-problem-heres-what-you-can-do-today-1jbg</guid>
      <description>&lt;p&gt;In May 2026, a worm called Shai-Hulud compromised 42 TanStack packages — including &lt;code&gt;@tanstack/react-router&lt;/code&gt;, a library sitting in millions of JavaScript projects. It was live for about 3 hours. That was enough. If you installed dependencies that day, you may have been affected without knowing it. This post isn't for the people who maintain those libraries. It's for the rest of us — the developers who just use them.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Fun fact" 1&lt;/strong&gt;&lt;br&gt;
It was live ~3 hours. &lt;code&gt;@tanstack/react-router&lt;/code&gt; alone gets &lt;strong&gt;12.7 million weekly downloads&lt;/strong&gt;. Meaning that it had &lt;strong&gt;~225K downloads in the ~3 hour window&lt;/strong&gt; — just for &lt;code&gt;react-router&lt;/code&gt;. That's one package. The attack hit 42 &lt;code&gt;@tanstack/*&lt;/code&gt; packages total.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Supply chain attacks used to feel like someone else's problem. A big library gets compromised, the maintainers fix it, life goes on. The Shai-Hulud worm changed that framing. It spread automatically to every package its victims maintained, turning regular developers into unwilling distributors of malware. Here's what happened, and what you can do today to reduce your exposure.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The workflow used &lt;code&gt;pull_request_target&lt;/code&gt;&lt;/strong&gt;, which runs with the base repo's trusted permissions — including access to secrets and a build cache shared with the real release pipeline.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;But it also checked out and executed the fork's code&lt;/strong&gt; for benchmarking purposes. That's the dangerous mix: a stranger's code running with your own repo's trust.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The attacker didn't need to steal anything immediately.&lt;/strong&gt; They just poisoned the shared cache and waited. Hours later, the legitimate release pipeline ran, picked up the tampered cache without knowing it, and published the malicious packages itself — using TanStack's own valid credentials.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The key insight&lt;/strong&gt;: the misconfiguration wasn't obvious. The benchmarking intent was reasonable; the mistake was not realizing that &lt;code&gt;pull_request_target&lt;/code&gt; + "run the PR's code" is always a dangerous combination regardless of what you're trying to do with it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Fun fact" 2&lt;/strong&gt;&lt;br&gt;
The worm had a &lt;strong&gt;dead-man's switch&lt;/strong&gt;. It planted a background service that polled &lt;code&gt;api.github.com/user&lt;/code&gt; with the stolen GitHub token every 60 seconds. If the token was revoked — meaning GitHub returned a 40x response — the service triggered &lt;code&gt;rm -rf ~/&lt;/code&gt;, wiping the user's entire home directory. You had to disable and remove the monitor service &lt;strong&gt;before&lt;/strong&gt; revoking any credentials&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  The good news
&lt;/h3&gt;

&lt;p&gt;Th &lt;code&gt;pull_request_target&lt;/code&gt; Pwn Request specifically requires a public repo where strangers can open PRs.&lt;/p&gt;

&lt;h3&gt;
  
  
  The bad news
&lt;/h3&gt;

&lt;p&gt;That said, the &lt;em&gt;other&lt;/em&gt; parts of this attack (cache poisoning between workflows, OIDC token over-scoping) can still apply to private repos if your GitHub Actions workflows have similar misconfigurations&lt;/p&gt;

&lt;p&gt;So far this sounds like a problem for library maintainers. It isn't. You don't need to maintain a library with millions of downloads to be exposed. You just need to run &lt;code&gt;npm install&lt;/code&gt; on the wrong day at the wrong time. The moment a compromised package lands in your &lt;code&gt;node_modules&lt;/code&gt;, you're part of the chain too.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Fun fact" 3&lt;br&gt;
Other affected libraries were &lt;code&gt;@mistralai/mistralai&lt;/code&gt;, &lt;code&gt;@uipath&lt;/code&gt;, &lt;code&gt;@draftlab/auth&lt;/code&gt;, &lt;code&gt;@draftlab/db&lt;/code&gt;, &lt;code&gt;@draftauth/client&lt;/code&gt;, &lt;code&gt;@squawk&lt;/code&gt;, &lt;code&gt;safe-action&lt;/code&gt;, &lt;code&gt;cmux-agent-mcp&lt;/code&gt;, &lt;code&gt;nextmove-mcp&lt;/code&gt;, &lt;code&gt;ts-dna&lt;/code&gt;, &lt;code&gt;cross-stitch&lt;/code&gt;, and more&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  How to prevent similar incidents?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  min-release-age &amp;amp; ignore-scripts
&lt;/h3&gt;

&lt;h4&gt;
  
  
  NPM — &lt;code&gt;.npmrc&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="py"&gt;min-release-age&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;7&lt;/span&gt;
&lt;span class="py"&gt;ignore-scripts&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;min-release-age=7&lt;/code&gt; blocks packages published less than 7 days ago&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ignore-scripts=true&lt;/code&gt; prevents lifecycle scripts like &lt;code&gt;preinstall&lt;/code&gt;/&lt;code&gt;prepare&lt;/code&gt; from running on install — which is exactly the vector the malicious &lt;code&gt;optionalDependency&lt;/code&gt; used.&lt;/li&gt;
&lt;li&gt;⚠️ npm CLI v11 is required. Upgrade to Node 24, or manually install npm v11.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  pnpm (10.16) — &lt;code&gt;pnpm-workspace.yaml&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;minimumReleaseAge&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10080&lt;/span&gt;  &lt;span class="c1"&gt;# minutes — 7 days&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;minimumReleaseAge&lt;/code&gt; is on by default, it uses 1 day&lt;/li&gt;
&lt;li&gt;Requires version 10.16 to avoid a bug that ignored this config.&lt;/li&gt;
&lt;li&gt;ignore-scripts: pnpm v10 stopped running &lt;code&gt;preinstall&lt;/code&gt;/&lt;code&gt;postinstall&lt;/code&gt; scripts by default&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Yarn Classic
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;❌ &lt;code&gt;min-release-age&lt;/code&gt; — &lt;strong&gt;not available.&lt;/strong&gt; No equivalent exists in v1.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;yarn install --ignore-scripts&lt;/code&gt; exists but only as a CLI argument&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Yarn Berry (v2+) — &lt;code&gt;.yarnrc.yml&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;npmMinimalAgeGate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10080&lt;/span&gt;   &lt;span class="c1"&gt;# minutes — 7 days&lt;/span&gt;
&lt;span class="na"&gt;enableScripts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;        &lt;span class="c1"&gt;# ignore-scripts equivalent&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;⚠️ Requires Yarn 4.10 and applies globally with no way to scope it&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Enforce the right versions with &lt;code&gt;engines&lt;/code&gt; in &lt;code&gt;package.json&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;All these protections depend on developers running the right version of their package manager. A simple way to make that explicit is the &lt;code&gt;engines&lt;/code&gt; field in &lt;code&gt;package.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"engines"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"node"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;gt;=22.0.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"npm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;gt;=11.0.0"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This won't block anything on its own — it's just a warning by default. To make it fail loudly, add this to &lt;code&gt;.npmrc&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="py"&gt;engine-strict&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With that in place, anyone running an older npm version will get an error instead of silently skipping &lt;code&gt;min-release-age&lt;/code&gt; protection.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ Use &lt;code&gt;engine-strict=true&lt;/code&gt; carefully. It will cause install failures anywhere the version requirements aren't met — including CI pipelines, Docker builds, or teammates' machines that haven't upgraded yet. Make sure your entire environment is aligned before enabling it, otherwise it can block legitimate work.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For pnpm you can do the same in &lt;code&gt;package.json&lt;/code&gt;, and it's respected out of the box without extra config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"engines"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"pnpm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;gt;=10.16.0"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's a small addition but it closes the gap between "we have this config" and "we know everyone on the team is actually running it."&lt;/p&gt;

&lt;h2&gt;
  
  
  What does this mean for Docker?
&lt;/h2&gt;

&lt;p&gt;If you're using &lt;code&gt;npm ci&lt;/code&gt; in your Dockerfile — which you should — you're already covered. &lt;code&gt;npm ci&lt;/code&gt; installs exactly what's in &lt;code&gt;package-lock.json&lt;/code&gt;, with no dependency resolution. No new versions are fetched, so there's nothing for &lt;code&gt;min-release-age&lt;/code&gt; to gate.&lt;/p&gt;

&lt;p&gt;The protection happens upstream, on the developer's machine or CI pipeline when the lockfile is generated. As long as &lt;code&gt;min-release-age&lt;/code&gt; is configured there, your Docker builds inherit that safety automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="c"&gt;# No extra config needed — npm ci uses the lockfile&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;npm ci
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The one thing worth calling out: this only holds if &lt;strong&gt;&lt;code&gt;npm install&lt;/code&gt; is never run inside Docker&lt;/strong&gt;. If someone switches to &lt;code&gt;npm install&lt;/code&gt; in the Dockerfile — say, to work around a lockfile sync issue — that protection disappears and &lt;code&gt;min-release-age&lt;/code&gt; would need to be configured there too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Update
&lt;/h2&gt;

&lt;p&gt;Another 317 packages affected: &lt;a href="https://safedep.io/mini-shai-hulud-strikes-again-314-npm-packages-compromised/" rel="noopener noreferrer"&gt;https://safedep.io/mini-shai-hulud-strikes-again-314-npm-packages-compromised/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;New proposal for install scripts to be opt-in: &lt;a href="https://github.com/npm/rfcs/pull/868" rel="noopener noreferrer"&gt;https://github.com/npm/rfcs/pull/868&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://snyk.io/blog/tanstack-npm-packages-compromised" rel="noopener noreferrer"&gt;https://snyk.io/blog/tanstack-npm-packages-compromised&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tanstack.com/blog/npm-supply-chain-compromise-postmortem" rel="noopener noreferrer"&gt;https://tanstack.com/blog/npm-supply-chain-compromise-postmortem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;npm &lt;code&gt;min-release-age&lt;/code&gt;&lt;/strong&gt; &lt;a href="https://docs.npmjs.com/cli/v11/using-npm/config#min-release-age" rel="noopener noreferrer"&gt;https://docs.npmjs.com/cli/v11/using-npm/config#min-release-age&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;npm + Node version relationship&lt;/strong&gt; (confirms v11 ships with Node 24) &lt;a href="https://nodejs.org/en/download/releases" rel="noopener noreferrer"&gt;https://nodejs.org/en/download/releases&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pnpm &lt;code&gt;minimumReleaseAge&lt;/code&gt;&lt;/strong&gt; &lt;a href="https://pnpm.io/settings#minimumreleaseage" rel="noopener noreferrer"&gt;https://pnpm.io/settings#minimumreleaseage&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pnpm v11 release notes&lt;/strong&gt; (confirms it's on by default at 1 day) &lt;a href="https://pnpm.io/blog/releases/11.0" rel="noopener noreferrer"&gt;https://pnpm.io/blog/releases/11.0&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Yarn Berry &lt;code&gt;npmMinimalAgeGate&lt;/code&gt;&lt;/strong&gt; (introduced in 4.10) &lt;a href="https://yarnpkg.com/configuration/yarnrc#npmMinimalAgeGate" rel="noopener noreferrer"&gt;https://yarnpkg.com/configuration/yarnrc#npmMinimalAgeGate&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Yarn Berry &lt;code&gt;enableScripts&lt;/code&gt;&lt;/strong&gt; &lt;a href="https://yarnpkg.com/configuration/yarnrc#enableScripts" rel="noopener noreferrer"&gt;https://yarnpkg.com/configuration/yarnrc#enableScripts&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TanStack commit histor&lt;/strong&gt;y &lt;a href="https://github.com/TanStack/router/commit/3ee179f0d9972173cb7510773fd26cb391b5fef5#diff-749feccfd42652f4a7571f0103a5b5b516b2b6d40f64f64200ac4c64870342aa" rel="noopener noreferrer"&gt;https://github.com/TanStack/router/commit/3ee179f0d9972173cb7510773fd26cb391b5fef5#diff-749feccfd42652f4a7571f0103a5b5b516b2b6d40f64f64200ac4c64870342aa&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>cybersecurity</category>
      <category>npm</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
