Malicious Code Injection in fs-commons: A Critical Vulnerability

fs-commons Updated 30 Sep 2026

Summary

29/09/2026
CRITICAL
No i
Critical
Not published

MAL-2026-17301: Malicious code in fs-commons (npm). Affects fs-commons versions 1.0.1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

fs-commons is an npm package designed as a filesystem and data-helper library. It provides functionalities to manage and manipulate data related to file systems. However, this package has been identified to contain malicious code that can execute arbitrary commands on the host system, posing significant security risks to applications that utilize it.

Vulnerability Detail

The vulnerability originates from the package's exported functions, getTransactions() and load_transaction_data(), which act as dynamic code loaders. The code obfuscates critical identifiers and retrieves the Function constructor through an indirect method, making static analysis difficult. When invoked, these functions read a sibling file, models.js, which disguises malicious payloads as product metadata. This allows an attacker to execute arbitrary code with full Node.js privileges, compromising the host system's security.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall fs-commons

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, you can remove the fs-commons package from your project until a secure version is released. This can be done using the command: npm uninstall fs-commons. Additionally, consider using alternative libraries that provide similar functionalities without the associated risks.

Conclusion

The fs-commons package contains a critical vulnerability that allows for the execution of malicious code on the host system. It is essential to update the package or remove it from your project to protect against potential security threats. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security of your applications.

See every vulnerability recorded for fs-commons →

Share this vulnerability

FAQ

fs-commons is an npm package that serves as a filesystem and data-helper library, facilitating data management and manipulation.

The vulnerability allows attackers to execute arbitrary code on your system, potentially leading to data breaches or system compromise.

Check the npm repository for fs-commons to see if a patched version has been released. If so, update the package to mitigate the risk.

Consider removing the fs-commons package from your project and using alternative libraries until a secure version is available.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using just your package-lock.json. You can also check your application against known vulnerabilities using the Vulert playground.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall fs-commons

If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback