Malicious Code Injection in @dransay/feature-flags Package

@dransay/feature-flags Updated 08 Oct 2026

Summary

08/10/2026
CRITICAL
No i
Critical
Not published

MAL-2026-17696: Malicious code in @dransay/feature-flags (npm). Affects @dransay/feature-flags versions 99.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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The @dransay/feature-flags package is a scoped npm package designed for managing feature flags in applications. It allows developers to enable or disable features dynamically without deploying new code. However, the package version 99.0.0 has been identified to contain malicious code that compromises user privacy and security.

Vulnerability Detail

The vulnerability originates from the package's preinstall hook, which executes a script (beacon.js) that performs a DNS lookup and an HTTPS GET request to a hardcoded callback host. This action occurs every time the package is installed, leaking the installer's public IP address, a timestamp, and confirming the resolution of the scoped name from the public registry. The malicious behavior is disguised as a probe of the author's build infrastructure, but it poses a significant risk to users by exposing sensitive information.

How To Fix

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

npm uninstall @dransay/feature-flags

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 prevent the execution of the preinstall hook by using the following command when installing the package:

npm install @dransay/feature-flags --ignore-scripts

This command will install the package without executing any scripts defined in the package.json.

Conclusion

The @dransay/feature-flags package version 99.0.0 contains malicious code that compromises user privacy. It is crucial for developers to update or remove this package to mitigate risks. Utilizing tools like Vulert can help in monitoring for such vulnerabilities effectively.

See every vulnerability recorded for @dransay/feature-flags →

Share this vulnerability

FAQ

The malicious code leaks the user's public IP address and other sensitive information to a third-party server during installation.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

As of now, version 99.0.0 is known to be malicious. Check the npm registry for any updated versions that may have addressed this issue.

If you have installed the package, it is recommended to remove it immediately and monitor your system for any unusual activity.

Vulert monitors and alerts in real-time for open-source vulnerabilities using just the package-lock.json file, allowing developers to stay informed about potential risks.

How To Fix

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

npm uninstall @dransay/feature-flags

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