Malicious Code Vulnerability in @dransay/db: DNS Lookup and Data Leakage

@dransay/db Updated 08 Oct 2026

Summary

08/10/2026
CRITICAL
No i
Critical
Not published

MAL-2026-17695: Malicious code in @dransay/db (npm). Affects @dransay/db 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 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 package @dransay/db is an npm library that is intended for database interactions. However, it has been compromised to include malicious code that executes during the installation process. This vulnerability allows attackers to gather reconnaissance on internal package names, potentially leading to further exploitation.

Vulnerability Detail

The vulnerability originates from a malicious preinstall hook in the package that executes a script (beacon.js) upon installation. This script performs a DNS lookup and sends an HTTPS GET request to a hardcoded subdomain controlled by an attacker, embedding the package name in the request path. This action leaks the installer's IP address and confirms to the attacker that the target organization is using the vulnerable package, making it susceptible to future attacks. Although no sensitive data is directly accessed, the reconnaissance aspect poses a significant risk.

How To Fix

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

npm uninstall @dransay/db

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 avoid using the @dransay/db package until a secure version is released. Additionally, consider using alternative packages that provide similar functionality without the associated risks.

Conclusion

The @dransay/db package has been compromised with malicious code that executes during installation, leading to potential data leakage and reconnaissance by attackers. It is essential to remove the package and monitor for updates to ensure the security of your application.

See every vulnerability recorded for @dransay/db →

Share this vulnerability

FAQ

The package contains malicious code that executes during installation, leaking information to an attacker.

You can use Vulert, which monitors open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without needing to sign up.

Remove the @dransay/db package from your project immediately and monitor for any updates or patches.

While the vulnerability does not directly access sensitive data, it poses a risk of information leakage that could lead to further attacks.

Regularly audit your dependencies, use tools like Vulert for real-time monitoring, and stay updated on security patches for all packages.

How To Fix

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

npm uninstall @dransay/db

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