Critical Malicious Code Vulnerability in knot-rspec-formatter-json Package
Summary
MAL-2026-3635: Malicious code in knot-rspec-formatter-json (RubyGems). Affects knot-rspec-formatter-json versions 3.13.5. 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 knot-rspec-formatter-json package is a RubyGem designed to format RSpec test results in JSON format. It is commonly used in Ruby applications to enhance test reporting. However, this package has been identified as part of a malicious cluster that compromises security by stealing credentials and tampering with environment variables.
Vulnerability Detail
This vulnerability originates from a malicious version of the knot-rspec-formatter-json package, which is part of the Go BufferZoneCorp and RubyGems knot-theory clusters. The malicious code can steal user credentials, establish unauthorized SSH access, and alter build or workflow environment variables, potentially leading to severe security breaches and data loss.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
bundle remove knot-rspec-formatter-json
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 affected package from your project until a secure version is confirmed. Use the following command: 'gem uninstall knot-rspec-formatter-json'. Additionally, consider using alternative packages that provide similar functionality without the associated risks.
Conclusion
The knot-rspec-formatter-json package has been compromised with malicious code that poses significant security risks. It is essential to update to a secure version or remove the package to protect your application from potential threats. Utilize tools like Vulert to stay informed about vulnerabilities in your software.
See every vulnerability recorded for knot-rspec-formatter-json →
FAQ
It is a RubyGem used for formatting RSpec test results in JSON format, commonly utilized in Ruby applications.
The malicious code can steal credentials, set up unauthorized SSH access, and tamper with environment variables, leading to potential data breaches.
You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without any signup.
As a temporary measure, consider uninstalling the package or using an alternative that does not pose security risks.
Detailed information can be found in the vulnerability report, and you can also check the GitHub repository for updates on the package.