Critical Malicious Code Vulnerability in @subql/common Package

@subql/common Updated 05 Oct 2026

Summary

05/10/2026
CRITICAL
No i
Critical
Not published

MAL-2026-17571: Malicious code in @subql/common (npm). Affects @subql/common versions 5.8.3. 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

The @subql/common package is a JavaScript library used in the Substrate ecosystem for building decentralized applications. It provides essential functionalities for managing data and interactions within Substrate-based projects. However, a severe vulnerability has been identified that allows for arbitrary code execution during the installation process, compromising the security of any system that uses this package.

Vulnerability Detail

The vulnerability originates from a malicious postinstall hook defined in the package's package.json file. This hook executes a script that decodes and executes embedded base64-encoded malicious code, allowing attackers to gain arbitrary control over the affected system. The malicious code is triggered during every npm install without any user consent or visible payload, making it particularly dangerous. The source map for the malicious script has been scrubbed to hide the true nature of the code, complicating detection efforts.

How To Fix

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

npm uninstall @subql/common

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 @subql/common package from your project by executing: npm uninstall @subql/common. This will prevent the execution of the malicious code until a patched version is released.

Conclusion

The @subql/common package has a critical vulnerability that allows for arbitrary code execution, posing significant risks to any system using it. Immediate action is required to mitigate the threat by updating or removing the package. Continuous monitoring and security practices are essential to safeguard against such vulnerabilities in the future.

See every vulnerability recorded for @subql/common →

Share this vulnerability

FAQ

The vulnerability involves malicious code execution during the npm install process, allowing attackers to gain control over the affected system.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without any signup.

If you have installed the affected version of @subql/common, it is recommended to uninstall the package immediately and rotate any sensitive credentials stored on the affected system.

To prevent similar vulnerabilities, regularly audit your dependencies, use tools like Vulert for monitoring, and avoid using packages from untrusted sources.

While removing the package will stop the execution of the malicious code, there is no guarantee that all traces of the malware will be removed. It is advisable to perform a thorough security audit of the affected system.

How To Fix

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

npm uninstall @subql/common

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