Malicious Code Vulnerability in ok-jest-config Package
Summary
MAL-2026-1806: Malicious code in ok-jest-config (npm). Affects ok-jest-config versions 5.0.0 – 5.1.0. 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 ok-jest-config package is a configuration tool for Jest, a popular JavaScript testing framework. It simplifies the setup process for developers by providing pre-configured settings that enhance testing efficiency. However, this package has been identified to contain malicious code, posing significant risks to users who integrate it into their projects.
Vulnerability Detail
The vulnerability stems from the inclusion of malicious code within the ok-jest-config package, specifically in versions 5.0.0 and 5.1.0. This malicious code can lead to unauthorized access, data breaches, or compromise of the user's development environment. The origin of this vulnerability is linked to the package's distribution through npm, where it was found to have been tampered with, potentially affecting any project that relies on it for testing configurations.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall ok-jest-config
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, consider removing the ok-jest-config package from your project until a secure version is confirmed. You can do this by executing the command: 'npm uninstall ok-jest-config'. Additionally, review your project's dependencies for any other potentially vulnerable packages.
Conclusion
The ok-jest-config package has been identified to contain malicious code, posing a significant risk to users. It is essential to update the package to the latest version or remove it from your project to mitigate potential threats. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for ok-jest-config →
FAQ
ok-jest-config is a configuration package for Jest, designed to streamline the setup of testing environments in JavaScript applications.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By checking your package-lock.json file, Vulert can help identify if your application is affected.
If an immediate update is not possible, consider removing the package and using alternative configurations or testing setups until a secure version is available.
Detailed information can be found on the GitHub repository of the malicious packages or through security advisories related to npm packages.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.