Critical Malicious Code Vulnerability in kns-error-code Package

kns-error-code Updated 25 Nov 2025

Summary

24/11/2025
CRITICAL
No i
Critical
Not published

MAL-2025-191120: Malicious code in kns-error-code (npm). Affects kns-error-code versions 1.0.8. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The kns-error-code package is an npm library designed for handling error codes in applications. It is utilized by developers to streamline error management and improve debugging processes. However, this package has been compromised, embedding malicious code that poses significant security risks to any system using it.

Vulnerability Detail

The vulnerability stems from the presence of embedded malicious code within the kns-error-code package, identified as version 1.0.8. This code can fully compromise any computer where the package is installed, allowing unauthorized access to sensitive information such as secrets and keys. The origin of this vulnerability is linked to a malicious actor who has manipulated the package, making it crucial for users to take immediate action to protect their systems.

How To Fix

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

npm uninstall kns-error-code

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

Currently, there are no effective workarounds to mitigate the risks associated with the kns-error-code package. The best course of action is to uninstall the package and monitor your system for any unusual activity.

Conclusion

The kns-error-code package has been compromised with malicious code, posing serious security risks to any system using it. Immediate action is required to uninstall the package and secure sensitive information. Users are encouraged to utilize tools like Vulert for ongoing monitoring of vulnerabilities in their applications.

See every vulnerability recorded for kns-error-code →

Share this vulnerability

FAQ

The kns-error-code package is an npm library used for managing error codes in applications, aiding developers in error handling and debugging.

The malicious code can fully compromise your system, allowing unauthorized access to sensitive information and potentially leading to data breaches.

You should immediately uninstall the kns-error-code package and rotate any sensitive information stored on the affected system.

No, there is currently no patched version of the kns-error-code package available. The only solution is to remove the package.

You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just your package-lock.json file. You can also check your application for this specific vulnerability using the Vulert playground at Vulert Scanner without any signup.

How To Fix

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

npm uninstall kns-error-code

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