Malicious Code Vulnerability in @dransay/secrets Package

@dransay/secrets Updated 08 Oct 2026

Summary

08/10/2026
CRITICAL
No i
Critical
Not published

MAL-2026-17699: Malicious code in @dransay/secrets (npm). Affects @dransay/secrets 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The @dransay/secrets package is an npm library that is intended for managing secrets in applications. It is designed to provide developers with a simple way to handle sensitive information securely. However, this package has been found to contain malicious code that compromises the security of systems that install it.

Vulnerability Detail

The vulnerability originates from a preinstall script in the @dransay/secrets package that executes a file named beacon.js. This script performs a DNS lookup and an HTTPS GET request to a hardcoded collector host during the npm install process. The requests include sensitive information such as the package name, the source IP of the machine, and the resolver identity, which can lead to unauthorized data exposure and potential exploitation by malicious actors. The package is designed to exploit dependency confusion, targeting internal package names to disclose sensitive information about the build environment.

How To Fix

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

npm uninstall @dransay/secrets

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 installation of the malicious package by using npm's package-lock.json file to lock the dependencies. Additionally, consider using tools like Vulert to monitor your project for vulnerabilities. You can check if your application is affected by this vulnerability using the Vulert playground at https://vulert.com/scanner without any signup.

Conclusion

The @dransay/secrets package contains a serious vulnerability due to embedded malicious code that can expose sensitive information. It is essential to uninstall this package and monitor your dependencies for vulnerabilities using tools like Vulert to ensure the security of your applications.

See every vulnerability recorded for @dransay/secrets →

Share this vulnerability

FAQ

The @dransay/secrets package is an npm library designed for managing secrets in applications, but it has been found to contain malicious code.

The malicious code executes a script during installation that sends sensitive information to a third-party collector, compromising the security of the system.

You should uninstall the @dransay/secrets package immediately and replace it with a secure alternative.

You can use tools like Vulert, which monitors your project for open-source vulnerabilities in real-time using just the package-lock.json file.

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

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

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

npm uninstall @dransay/secrets

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