Critical Malicious Code Vulnerability in mathmain Package

mathmain Updated 22 Sep 2026

Summary

21/09/2026
CRITICAL
No i
Critical
Not published

MAL-2026-16368: Malicious code in mathmain (npm). Affected versions are not published. 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 mathmain package is an npm library designed for mathematical computations and operations. It is widely used in various applications that require mathematical functionalities. However, this package has been compromised, leading to severe security risks for any system utilizing it. The malicious code embedded within can potentially give unauthorized access to sensitive information and system controls.

Vulnerability Detail

The vulnerability originates from the presence of malicious code within the mathmain package, identified as GHSA-v6mx-2p6p-3628. Any system running this package is considered fully compromised, with the potential for attackers to access all secrets and keys stored on the machine. The malicious code can lead to data breaches, unauthorized access, and complete control over the affected systems. Users are advised to treat any system with this package installed as compromised and take immediate action.

How To Fix

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

npm uninstall mathmain

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

There are no effective workarounds for this vulnerability. The only recommended action is to remove the mathmain package entirely from your system.

Conclusion

The mathmain package has been compromised with malicious code, posing significant risks to any system using it. Users must act swiftly to remove the package and secure their sensitive information. Regular monitoring for vulnerabilities, such as through Vulert, can help prevent future incidents.

See every vulnerability recorded for mathmain →

Share this vulnerability

FAQ

Immediately remove the mathmain package from your system and rotate any sensitive information stored on it.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Currently, there is no patched version available. The best course of action is to remove the package.

Failing to remove mathmain can lead to unauthorized access to your system, data breaches, and potential control by malicious actors.

Vulert monitors and alerts for open-source vulnerabilities in your software using just the package-lock.json file, providing real-time insights.

How To Fix

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

npm uninstall mathmain

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