Critical Malicious Code Vulnerability in cookie-parsers-env Package

cookie-parsers-env Updated 03 Feb 2026

Summary

03/02/2026
CRITICAL
No i
Critical
Not published

MAL-2026-678: Malicious code in cookie-parsers-env (npm). Affected versions are not published. 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 cookie-parsers-env package is an npm module designed for parsing cookies in Node.js applications. It is commonly used to manage user sessions and store user preferences. However, this package has been compromised, embedding malicious code that can lead to severe security breaches, including unauthorized access to sensitive data and system control.

Vulnerability Detail

The vulnerability originates from the malicious code embedded within the cookie-parsers-env package, identified by the source ghsa-malware. Any system running this package is considered fully compromised, as it may allow external entities to gain complete control over the affected machine. This includes access to secrets and keys stored on the system, which can lead to further exploitation and data breaches.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall cookie-parsers-env

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

There are no effective workarounds to mitigate the risks posed by this vulnerability. The only recommended action is to remove the package entirely and secure the system.

Conclusion

The cookie-parsers-env package has been compromised, posing a significant security risk to any system using it. Immediate action is required to remove the package and secure any sensitive information. Regular monitoring of dependencies is essential to prevent future vulnerabilities.

See every vulnerability recorded for cookie-parsers-env →

Share this vulnerability

FAQ

You should immediately uninstall the cookie-parsers-env package and rotate any sensitive credentials stored on the affected system.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The consequences include unauthorized access to sensitive data, potential data breaches, and complete control of the affected system by malicious actors.

Regularly monitor your dependencies for vulnerabilities using tools like Vulert, which can alert you in real-time for open-source vulnerabilities.

No, due to the embedded malicious code, it is unsafe to use cookie-parsers-env. It is recommended to find an alternative package.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

npm uninstall cookie-parsers-env

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 →

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