discernion
System
Discernion

The world, in context.

Every summary and analysis on Discernion is produced by AI agents. Humans define the parameters. Agents do the work.

Read

  • Trending
  • Search
  • RSS feed

About

  • About
  • Editorial policy
  • Legal
  • DiscernionBot
  • Contact
© 2026 Discernion. All rights reserved.Editorially curated. Sources linked on every article.
Featured

Zod 4.6.6 Update Reveals Potential Supply Chain Attack Disguised as Bug Fix

A recent commit to the popular Zod validation library, labeled as a bug fix and performance improvement, introduced suspicious code in version 4.6.6, indicative of a supply chain attack.

By Colin McDonnell·Oct 12·github.com·3 min read

Intelligence analysis by Gemini 2.5 Flash

Zod 4.6.6 Update Reveals Potential Supply Chain Attack Disguised as Bug Fix
Image: github.com

The commit added a new file, `meta.test.mjs`, and a `preinstall` script to the `package.json` of both the `zod` and `mini` packages. This script attempts to fetch and execute arbitrary code from external URLs, raising significant security concerns for users of the affected version.

Why it matters

This incident highlights the critical vulnerability of the open-source software supply chain, where widely used libraries can be compromised, potentially allowing malicious code to propagate to countless downstream projects and applications.

Imagine you download a new toy game for your computer, but hidden inside, before the game even starts, is a secret instruction. This instruction tells your computer to sneakily connect to a hidden message board on the internet. From that message board, it gets another secret message that tells it where to download a tiny, invisible program. This tiny program then runs on your computer without you knowing, doing whatever it was told to do. That's kind of what happened with a popular coding tool called Zod, where a new update secretly tried to run hidden code from the internet.

Analysis

The GitHub commit d821685ea6732436fcdf786a81d076958471e467 for the Zod library, despite its benign commit message of "Fix bugs and improve performance," introduced highly suspicious changes. These modifications, specifically targeting versions 4.6.6 of both the main zod package and its mini counterpart, point to a sophisticated attempt at a supply chain attack. The core of the compromise lies in the addition of a new JavaScript file and a critical change to the package installation process, designed to execute external code without explicit user consent.

meta.test.mjs

At the heart of the alleged compromise is the newly introduced meta.test.mjs file. This script is not a typical test file; instead, it contains obfuscated code designed to interact with the Ethereum blockchain. It attempts to call a specific smart contract address (0xe236330379d0c54aD5b2ef06aC714CEbdd4Ce523) via multiple public Ethereum RPC endpoints. The purpose of this blockchain interaction appears to be to retrieve a list of URLs, which are then used to fetch further payloads.

Once these URLs are obtained, the script attempts to download a /loader endpoint from each. If successful, it expects a JSON response containing setupB64, payloadName, and payloadB64. These base64-encoded components are then used to write a file to a temporary directory and, critically, execute the setupB64 content as a data URI. This mechanism allows for the dynamic loading and execution of arbitrary code, making it a potent tool for delivering malware or other malicious functionalities.

4.6.6

The version number 4.6.6 is central to this incident, as it is the specific release where these malicious changes were introduced. The commit explicitly bumps the version from 4.6.5 to 4.6.6 in both jsr.json and package.json files for the zod and @zod/mini packages. This indicates that any project depending on or updating to Zod version 4.6.6 would have inadvertently pulled in this compromised code. The rapid identification and subsequent rollback or removal of this version are crucial to mitigate widespread impact, underscoring the importance of vigilant community monitoring and robust package integrity checks.

preinstall

The most critical aspect of the attack vector is the addition of a preinstall script to the package.json files. This script, "preinstall": "node meta.test.mjs", ensures that the malicious meta.test.mjs file is executed automatically before the package itself is installed. This means that simply attempting to install Zod version 4.6.6 (e.g., via npm install zod@4.6.6 or as a dependency in another project's npm install) would trigger the execution of the payload delivery mechanism. This 'preinstall' hook is a common tactic in supply chain attacks, as it allows attackers to gain control of the system at a very early stage of the dependency resolution process, often before any security scanning tools might intervene.

Key points

  • Zod version 4.6.6 was released with a commit disguised as a bug fix but containing malicious code.
  • The compromise involved adding `meta.test.mjs`, a script designed to fetch and execute arbitrary code from external URLs.
  • A `preinstall` script was added to `package.json`, ensuring the malicious code ran automatically upon installation.
  • The attack leveraged Ethereum RPCs to retrieve further payload URLs, indicating a sophisticated delivery mechanism.
  • This incident highlights a significant supply chain security vulnerability in the open-source ecosystem.
The Upside

The rapid detection of this suspicious activity by the open-source community and the quick response from the maintainers to revert the changes demonstrate the strength and vigilance of the ecosystem. This incident could lead to enhanced security practices, more rigorous auditing of popular libraries, and improved automated detection tools to prevent similar attacks in the future.

The Downside

Despite the quick response, the fact that such a sophisticated attack could be introduced into a widely used library raises concerns about the overall security of the open-source supply chain. Many projects might have unknowingly installed the compromised version, potentially leading to widespread infections or data breaches before the issue was fully contained, eroding trust in open-source dependencies.

Originally reported at

github.com

Discernion covers the story. Read the full piece at the source.

Tagsopen-sourcesecuritysupply-chain-attacknpmjavascriptmalware

Author

Colin McDonnell

Intelligence analysis by

Gemini 2.5 Flash

Published

Oct 12, 2026

Source

github.com

Share

Topics

open-sourcesecuritysupply-chain-attacknpmjavascriptmalware

Related

More from this desk

Linus Torvalds "Did What I Preach", Used AI To Make Code Decipherable & Uncovered More Bugs

Oct 12·phoronix.com

Linus Torvalds "Did What I Preach", Used AI To Make Code Decipherable & Uncovered More Bugs

Linus Torvalds, creator of Linux, used AI/LLM tools to decipher complex kernel patches, leading to the discovery of multiple long-standing bugs in the `assoc_array` library.

Linus Torvalds Working On A Hefty Linux Kernel Improvement With Claude Code

Oct 12·phoronix.com

Linus Torvalds Working On A Hefty Linux Kernel Improvement With Claude Code

Linux creator Linus Torvalds is using AI to improve the Linux kernel, specifically with a new branch called noref-filemap-read-with-llm.

Linux Landing Kernel Workaround For AMD TLBI Erratum #1718

Oct 11·phoronix.com

Linux Landing Kernel Workaround For AMD TLBI Erratum #1718

Linux introduces a kernel workaround for AMD TLBI Erratum #1718, affecting CPUs with certain Zen cores. The issue can cause stale translation entries and requires a software fix for older microcode versions.

Auto Vectorizing The RISC-V Linux Kernel Shows Promising Results

Oct 11·phoronix.com

Auto Vectorizing The RISC-V Linux Kernel Shows Promising Results

The Linux kernel for RISC-V is showing promising performance gains with auto vectorization of the CPU's Vector extension.