Malicious Code Vulnerability in jest-formatting Package
Summary
MAL-2025-192806: Malicious code in jest-formatting (npm). Affects jest-formatting versions 9.9.2. 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
jest-formatting is an npm package used for formatting Jest test output. It enhances the readability of test results, making it easier for developers to understand the outcomes of their tests. However, this package has been identified as having a serious vulnerability that allows for the execution of malicious code, potentially compromising the security of applications that rely on it.
Vulnerability Detail
The vulnerability in jest-formatting stems from the inclusion of malicious code within the package. This code can execute arbitrary commands on the host system, leading to unauthorized access, data breaches, or system compromise. The malicious code was identified in version 9.9.2 of the package, and it poses a significant risk to any application that integrates this version. The origin of this vulnerability is linked to a malicious actor who has manipulated the package to include harmful scripts.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall jest-formatting
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, you can remove the jest-formatting package from your project until a secure version is confirmed. You can do this by running the command: 'npm uninstall jest-formatting'. This will prevent any potential exploitation of the vulnerability while you seek a safe alternative or wait for a patch.
Conclusion
The jest-formatting package has a critical vulnerability due to the presence of malicious code in version 9.9.2. It is essential for developers using this package to update to a patched version or remove it from their projects to mitigate the risk of exploitation. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for jest-formatting →
FAQ
The malicious code can execute arbitrary commands, leading to unauthorized access and potential data breaches.
You can use Vulert, which monitors vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
Consider removing the package temporarily as a workaround until a secure version is available.
Yes, version 9.9.2 of jest-formatting has been identified as containing the malicious code.
The vulnerability was reported by ReversingLabs, a security research firm.