Malicious Code Detected in codens-auth: A Critical Security Alert
Summary
MAL-2025-17254: Malicious code in codens-auth (npm). Affected versions are not published. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The package 'codens-auth' is an npm library designed for authentication processes in JavaScript applications. It provides developers with tools to manage user authentication securely. However, recent findings have revealed that this package contains malicious code, posing significant security risks to applications that utilize it.
Vulnerability Detail
The vulnerability in 'codens-auth' stems from the inclusion of malicious code that can compromise the security of applications using this package. This code may allow unauthorized access to sensitive data or enable other malicious activities within the affected systems. The issue was introduced in version 0 and affects all subsequent versions, making it imperative for users to take immediate action to mitigate potential damage.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall codens-auth
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, developers can replace 'codens-auth' with another authentication library that is known to be secure. Ensure to thoroughly test the new library to confirm it meets your application's requirements.
Conclusion
The discovery of malicious code in the 'codens-auth' package highlights the importance of vigilance in managing dependencies. Users are urged to remove this package and explore secure alternatives to protect their applications from potential threats.
See every vulnerability recorded for codens-auth →
FAQ
The malicious code can potentially allow unauthorized access to user data and compromise application security.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
You should remove the codens-auth package immediately and consider using a secure alternative for authentication.
Currently, there is no patched version available. It is advised to look for alternative packages.
Vulert monitors and alerts in real-time for open-source vulnerabilities in your software using just the package-lock.json file.