Malicious Code Detected in spring-context Package - Vulnerability MAL-2025-6129
Summary
MAL-2025-6129: Malicious code in spring-context (npm). Affects spring-context versions >= 5.3.18. 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 spring-context package is a widely used library in the JavaScript ecosystem, particularly for applications that require dependency injection and application context management. It provides essential features for building scalable and maintainable applications. However, recent findings have revealed that this package has been compromised, allowing it to communicate with a domain associated with malicious activities, posing a significant risk to users.
Vulnerability Detail
The vulnerability identified as MAL-2025-6129 originates from version 5.3.18 of the spring-context package. It allows the package to establish communication with a malicious domain, potentially leading to data breaches, unauthorized access, or other harmful actions. This vulnerability can affect any application utilizing this package, making it critical for developers to address it promptly.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall spring-context
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 spring-context package from your project if it is not essential. If you must use it, consider implementing network restrictions to prevent communication with untrusted domains.
Conclusion
The spring-context package has been identified as having a serious vulnerability that allows it to communicate with malicious domains. It is crucial for developers to update the package to a secure version or implement workarounds to protect their applications. Utilizing tools like Vulert can help in monitoring for such vulnerabilities effectively.
See every vulnerability recorded for spring-context →
FAQ
The spring-context package is a library used in JavaScript applications for managing application contexts and dependency injection.
This vulnerability can allow malicious actors to exploit your application by communicating with harmful domains, potentially leading to data theft or unauthorized access.
If an immediate update is not possible, consider removing the package or implementing network restrictions to mitigate risks.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using just your package-lock.json file. You can check your application for vulnerabilities using the Vulert playground without signing up.
Detailed information about this vulnerability can be found on the GitHub repository of the malicious packages project.