Malicious Code Detected in corstoken Package: Version 2.14.7 Vulnerability

corstoken Updated 27 Feb 2026

Summary

26/02/2026
CRITICAL
No i
Critical
Not published

MAL-2026-1051: Malicious code in corstoken (npm). Affects corstoken versions 2.14.7. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The 'corstoken' package, available on npm, is designed to facilitate secure token generation for cross-origin resource sharing (CORS). It is widely used in web applications to manage API access and enhance security. However, version 2.14.7 has been identified as malicious, posing significant risks to users and their applications.

Vulnerability Detail

The vulnerability in the 'corstoken' package arises from its ability to communicate with a domain linked to malicious activities. Furthermore, it executes commands that are associated with harmful behavior, potentially compromising the security of applications that utilize this package. This could lead to unauthorized access, data breaches, and other forms of exploitation.

How To Fix

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

npm uninstall corstoken

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 measure, you can avoid using the 'corstoken' package altogether until a secure version is confirmed. If your application relies on it, consider implementing alternative methods for secure token generation that do not involve this package.

Conclusion

The discovery of malicious code in the 'corstoken' package version 2.14.7 poses serious risks to applications that utilize it. Users are strongly advised to uninstall this version and seek secure alternatives. Regular monitoring and updates are crucial to maintaining application security.

See every vulnerability recorded for corstoken →

Share this vulnerability

FAQ

The 'corstoken' package is used for generating secure tokens for CORS, helping to manage API access and enhance security in web applications.

The vulnerability allows the package to communicate with malicious domains and execute harmful commands, which can lead to unauthorized access and data breaches.

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

There is no patch for version 2.14.7 as it is considered malicious. It is recommended to uninstall this version and install a secure alternative.

If immediate updates are not possible, consider implementing alternative secure token generation methods and monitor your application closely for any suspicious activity.

How To Fix

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

npm uninstall corstoken

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