CVE-2017-16081: Hijacked Environment Variables in cross-env.js

cross-env.js Updated 02 Oct 2025

Summary

01/09/2020
No i
Moderate
Not published

CVE-2017-16081: cross-env.js is malware. Affects cross-env.js versions >= 0.0.0. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The cross-env.js package is a popular npm package used for setting environment variables in a cross-platform manner. It allows developers to define environment variables that work consistently across different operating systems. However, all versions of this package have been found to be infected with malware that steals environment variables and sends them to attacker-controlled locations.

Vulnerability Detail

The vulnerability in cross-env.js allows an attacker to hijack environment variables and exfiltrate them to their own servers. This can lead to the compromise of sensitive information such as credentials, tokens, and other sensitive data stored in environment variables. The malware is capable of silently collecting this information without the user's knowledge, posing a significant security risk.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to remove the infected package and follow the recommended steps to mitigate the risk.

Conclusion

The cross-env.js package has been found to be infected with malware that steals environment variables. If you have this package installed in your environment, it is crucial to remove it immediately and follow the recommended steps to mitigate the risk. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for cross-env.js →

Share this vulnerability

FAQ

You can check if the cross-env.js package is installed by running the command npm ls cross-env.js in your project directory. If it is listed in the output, it means the package is installed.

If you find the cross-env.js package installed, it is recommended to follow the steps mentioned in the 'how_to_fix' section of this report to remove the package and mitigate the vulnerability.

Yes, this vulnerability can lead to the compromise of sensitive data stored in environment variables. It is important to take immediate action to remove the infected package and secure any exposed credentials.

The recommended fix for this vulnerability is to remove the cross-env.js package from your project and follow the steps mentioned in the 'how_to_fix' section of this report.

After removing the infected package, it is important to regenerate any exposed credentials, tokens, or registry credentials. Additionally, review and secure any services that may have been exposed via compromised environment variables.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback