Screenshot of the npm page for imgdecode showing its download count and publisher name

MALFEX npm Package 'imgdecode' Hides Shellcode Loader in Windows Native Addon

Researchers have uncovered a malicious npm package called imgdecode that embeds a Windows native shellcode loader, tying it to the MALFEX software‑supply‑chain campaign. The package was uploaded on September 30 2026 and has already been downloaded 979 times, yet it remains publicly available on npm. For developers and security teams, this illustrates how seemingly innocuous dependencies can become a direct conduit for executable malware.

Discovery and Attribution of the imgdecode Package

The package surfaced in the npm registry under the user name malfexteste8, a moniker that aligns with other artifacts linked to the MALFEX operation. Its initial publication date, September 30 2026, coincides with a broader wave of supply‑chain compromises reported earlier this year. Attribution relies on the consistent naming pattern and the timing of uploads, which together form a fingerprint that investigators use to map the threat actor’s infrastructure.

Despite its malicious intent, imgdecode has been downloaded 979 times, indicating that developers either trusted the package’s name or were unaware of its hidden payload. The continued presence of the package on npm underscores a gap in automated vetting processes that fail to flag code based solely on download metrics. This gap is especially problematic for projects that lock dependencies without rigorous manual review.

Technical Mechanics: Shellcode Loader Embedded in a Windows Native Addon

Imgdecode is not a pure JavaScript module; it includes a compiled Windows native addon that executes low‑level shellcode upon loading. The shellcode acts as a loader, capable of pulling additional malicious binaries into memory and evading typical JavaScript sandbox restrictions. By leveraging native code, the attacker bypasses many of the runtime protections that are effective against pure‑JS threats.

The choice of a Windows target reflects the prevalence of Node.js applications in enterprise environments that often run on Windows servers. Once the native addon is required by a victim’s code, the loader can establish persistence, exfiltrate data, or execute further payloads without raising immediate alarms. This technique demonstrates a sophisticated evolution from script‑only malware to hybrid attacks that blend interpreted and compiled components.

Broader Supply Chain Threat Landscape and npm Ecosystem Vulnerabilities

The imgdecode incident is a microcosm of a larger trend where attackers compromise open‑source ecosystems to achieve rapid distribution. npm’s low barrier to entry—any user can publish a package with minimal verification—creates a fertile ground for malicious actors to masquerade as legitimate contributors. The 979 downloads of imgdecode, while modest compared to popular libraries, still represent a non‑trivial exposure vector for any project that includes it as a transitive dependency.

Current npm security tooling, such as automated audits, often flags known vulnerable versions but struggles to detect novel malicious behavior embedded in native code. This limitation forces organizations to adopt complementary strategies like provenance verification, code signing, and strict dependency pinning. Without these safeguards, the supply chain remains a blind spot that can be exploited by threat actors employing tactics similar to those observed in the MALFEX campaign.

What This Actually Means For You

  1. Downloading a package does not guarantee safety; even low‑download packages like imgdecode can carry active shellcode.
  2. Native addons can bypass JavaScript‑only security controls, so any dependency that includes compiled binaries warrants extra scrutiny.
  3. Supply‑chain attacks can propagate quickly through transitive dependencies, affecting projects that never directly referenced the malicious package.
  4. Relying solely on npm’s automated alerts is insufficient; manual code reviews and provenance checks are essential.
  5. Maintaining an up‑to‑date lockfile and regularly pruning unused packages reduces the attack surface for hidden threats.

Immediate Action Steps

First, audit your project's dependency tree for any reference to imgdecode or other packages published by the user malfexteste8. Use tools like npm ls to trace transitive dependencies and remove or replace any matches with vetted alternatives.

Second, enforce a policy that requires all native addons to undergo manual code review and, where possible, be signed with a trusted certificate. Combine this with regular npm audit runs and integrate supply‑chain scanning solutions that can flag anomalous binary content before it reaches production.

Frequently Asked Questions

How many times has the imgdecode package been downloaded?

The package has been downloaded 979 times according to the npm registry data at the time of reporting.

When was the malicious imgdecode package uploaded to npm?

It was uploaded on September 30 2026 by the user named malfexteste8.

Is the imgdecode package still available on npm?

Yes, the package remains publicly available on the npm registry despite its identified malicious behavior.

What Do You Think?

Given the ease with which a single malicious native addon can infiltrate countless projects, should organizations rethink their reliance on open‑source package ecosystems as a core component of their software supply chain?

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.