Malicious Code Vulnerability in actions-detectenv Package
Summary
MAL-2025-6397: Malicious code in actions-detectenv (npm). Affects actions-detectenv versions 3.0.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 actions-detectenv package is a Node.js library designed to detect environment variables in CI/CD workflows. It is commonly used in GitHub Actions to streamline the development process by providing insights into the environment configuration. However, this package has been identified to contain malicious code, posing a significant risk to users who rely on it for their development and deployment processes.
Vulnerability Detail
The vulnerability stems from the inclusion of malicious code in version 3.0.0 of the actions-detectenv package. This code can potentially compromise the security of applications that utilize the package, leading to unauthorized access, data breaches, or other malicious activities. The origin of this vulnerability is linked to the package being flagged by security researchers at ReversingLabs, who discovered the malicious behavior during routine analysis. Users of this package should be particularly cautious as the implications of this vulnerability can extend to the integrity of their entire development pipeline.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall actions-detectenv
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, users may consider removing the actions-detectenv package from their project until a secure version is confirmed. Alternatively, users can implement environment variable detection manually or use a different, trusted package that offers similar functionality without the associated risks.
Conclusion
The actions-detectenv package has been identified to contain malicious code, posing a serious risk to users. It is crucial to update to a secure version or consider alternative solutions to mitigate potential threats. Regular monitoring of dependencies using tools like Vulert can help maintain application security.
See every vulnerability recorded for actions-detectenv →
FAQ
actions-detectenv is a Node.js library used to detect environment variables in CI/CD workflows, particularly in GitHub Actions.
The vulnerability involves malicious code embedded in the actions-detectenv package, which can compromise application security.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
Update the actions-detectenv package to the latest version using npm install actions-detectenv@latest and consider removing it temporarily until a secure version is confirmed.
The vulnerability was discovered by security researchers at ReversingLabs, who flagged the malicious behavior during their analysis.