<?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>DEV Community: Vinicius de Santana</title>
    <description>The latest articles on DEV Community by Vinicius de Santana (@viniciusvts).</description>
    <link>https://dev.to/viniciusvts</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%2F3938874%2F7462ae4f-7abd-42a8-bce7-4052cab55a66.jpeg</url>
      <title>DEV Community: Vinicius de Santana</title>
      <link>https://dev.to/viniciusvts</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/viniciusvts"/>
    <language>en</language>
    <item>
      <title>How I responded to a Supply Chain attack before it hit my project</title>
      <dc:creator>Vinicius de Santana</dc:creator>
      <pubDate>Mon, 18 May 2026 20:15:47 +0000</pubDate>
      <link>https://dev.to/viniciusvts/how-i-responded-to-a-supply-chain-attack-before-it-hit-my-project-5d05</link>
      <guid>https://dev.to/viniciusvts/how-i-responded-to-a-supply-chain-attack-before-it-hit-my-project-5d05</guid>
      <description>&lt;p&gt;If you work within the modern JavaScript/TypeScript ecosystem, there is a very high chance you are using a TanStack library. Whether it's the omnipresent TanStack Query (formerly React Query), Table, or the newer React Router, they are pretty much everywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  The attack
&lt;/h2&gt;

&lt;p&gt;And May 11, 2026, definitely gave a lot of developers a stomachache.&lt;/p&gt;

&lt;p&gt;For those who missed it, the TanStack ecosystem suffered a critical supply chain compromise (&lt;strong&gt;CVE-2026-45321&lt;/strong&gt;). A threat actor managed to compromise TanStack's CI/CD pipelines through a "Pwn Request" (cache poisoning via &lt;code&gt;pull_request_target&lt;/code&gt; in GitHub Actions), successfully publishing 84 malicious versions across 42 discrete packages. While the main blast radius targeted &lt;code&gt;@tanstack/react-router&lt;/code&gt;, the entire stack flashed red.&lt;/p&gt;

&lt;p&gt;The worst part about this type of attack? The malicious code executes immediately the moment you or your build server runs an innocent &lt;code&gt;npm install&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  "Crisis Mode" Activated: What I did first
&lt;/h2&gt;

&lt;p&gt;When a CVE like this lands on your lap, there's no point in panicking; you need data. My priority was isolating the blast radius using three basic steps:&lt;/p&gt;

&lt;h3&gt;
  
  
  Timeline Cross-Referencing vs. CI/CD Logs
&lt;/h3&gt;

&lt;p&gt;The very first thing I did was open the official TanStack post-mortem to grasp the exact exposure window (the timeline from when the malicious packages became available on npm to when they were officially pulled).&lt;/p&gt;

&lt;p&gt;With those timestamps in hand, I went to our CI/CD server logs. I needed to answer one crucial question: &lt;strong&gt;"Did we run any automated build or deploy pipelines during this specific timeframe?"&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Fortunately, the result was negative. Our servers hadn't touched npm while the attack was live. First line of defense: OK.&lt;/p&gt;

&lt;h3&gt;
  
  
  Local Dependency Auditing
&lt;/h3&gt;

&lt;p&gt;Even with the server secure, the danger often lurks right next door: developer machines. Since we use packages like &lt;code&gt;@tanstack/vue-query&lt;/code&gt; and &lt;code&gt;@tanstack/query-core&lt;/code&gt;, there was a realistic risk that someone on the team could have run &lt;code&gt;npm install&lt;/code&gt; locally and pulled a compromised version.&lt;/p&gt;

&lt;p&gt;I immediately alerted the team to pause all local installations and initiated a dependency scan to ensure no one was stuck on an attacker-built version.&lt;/p&gt;

&lt;h3&gt;
  
  
  Leaving a Paper Trail (Governance)
&lt;/h3&gt;

&lt;p&gt;Once the immediate risk was mitigated, I spent some time putting together a technical incident report. It might look like bureaucracy on the surface, but documenting the event chronology, what systems were validated, and logging a final status of "Not Compromised" is what separates a team that "got lucky" from a team with mature governance workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to make sure your environment is clean
&lt;/h2&gt;

&lt;p&gt;If you think you might have been exposed over the past week, the path forward recommended by the TanStack team involves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Force the update:&lt;/strong&gt; Move immediately to the patched versions they released right after the incident.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nuke local cache:&lt;/strong&gt; Changing your &lt;code&gt;package.json&lt;/code&gt; isn't enough. Delete your &lt;code&gt;node_modules&lt;/code&gt; folder, delete your &lt;code&gt;package-lock.json&lt;/code&gt; (or equivalent), and completely wipe your package manager cache (&lt;code&gt;npm cache clean --force&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Host Inspection:&lt;/strong&gt; The malicious script attempts to spread or harvest environment data. It's well worth checking out the &lt;code&gt;Detection&lt;/code&gt; section in their official post-mortem to hunt down any anomalous processes or mutations within your &lt;code&gt;.npm&lt;/code&gt; directory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full post-mortem can be read at: &lt;a rel="noopener noreferrer" href="https://tanstack.com/blog/npm-supply-chain-compromise-postmortem#timeline"&gt;Postmortem: TanStack npm supply-chain compromise&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons for the future (An Architecture Perspective)
&lt;/h2&gt;

&lt;p&gt;Incidents like this remind us that our software architecture is only as strong as the weakest link in our dependency supply chain.&lt;/p&gt;

&lt;p&gt;Monitoring CVEs manually simply doesn’t scale. As a takeaway from this scare, our next step here is refining our CI/CD pipelines to bake in &lt;strong&gt;SCA (Software Composition Analysis)&lt;/strong&gt; tools more aggressively, automatically breaking the build if a &lt;code&gt;package-lock.json&lt;/code&gt; tries to sneak through with a compromised dependency.&lt;/p&gt;

&lt;p&gt;What about you? How did you find out about this attack, and did you manage to run diagnostics on your project in time?&lt;/p&gt;

</description>
      <category>suplychainatack</category>
      <category>webdev</category>
      <category>npm</category>
    </item>
  </channel>
</rss>
