Critical Malicious Code Vulnerability in pretty-jsonify Package
Summary
MAL-2025-190554: Malicious code in pretty-jsonify (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
pretty-jsonify is an npm package designed to format JSON data in a more readable way. It is commonly used in web applications to enhance the presentation of JSON objects. However, this package has been identified to contain malicious code, posing significant security risks to any system where it is installed.
Vulnerability Detail
The vulnerability originates from the presence of embedded malicious code within the pretty-jsonify package. This code can compromise any computer that has the package installed, allowing unauthorized access to sensitive information such as secrets and keys. The ramifications of this vulnerability are severe, as it can lead to full control of the affected system by an outside entity, making it imperative for users to take immediate action.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall pretty-jsonify
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 workaround, users should ensure that the pretty-jsonify package is uninstalled from their systems. This can be done using the command: npm uninstall pretty-jsonify. Additionally, users should monitor their systems for any unusual activity following the removal of the package.
Conclusion
The discovery of malicious code in the pretty-jsonify package highlights the importance of vigilance when using open-source software. Users must act swiftly to mitigate risks by removing the package and securing their systems. Utilizing tools like Vulert can aid in monitoring for such vulnerabilities in the future.
See every vulnerability recorded for pretty-jsonify →
FAQ
Immediately uninstall the package and rotate any sensitive information stored on your system.
You can use Vulert's playground at Vulert Scanner to check for vulnerabilities without needing to sign up.
Regularly monitor your dependencies for vulnerabilities using tools like Vulert, which can alert you in real-time.
Failing to address this vulnerability can lead to unauthorized access to your system and potential data breaches.
While many npm packages are safe, it is crucial to regularly audit and monitor them for vulnerabilities.