Critical Malicious Code Vulnerability in @silgi/better-auth Package

@silgi/better-auth Updated 25 Nov 2025

Summary

24/11/2025
CRITICAL
No i
Critical
Not published

MAL-2025-191311: Malicious code in @silgi/better-auth (npm). Affects @silgi/better-auth versions 0.8.1. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The @silgi/better-auth package is an npm library designed to facilitate authentication processes in web applications. It offers features such as token management and user session handling. However, this package has been compromised, making it a significant risk for developers who rely on it for secure authentication.

Vulnerability Detail

This vulnerability originates from a malicious payload embedded within the @silgi/better-auth package, specifically version 0.8.1. The package was compromised by the Sha1-Hulud: The Second Coming NPM worm, which is designed to steal tokens and credentials, publishing them to GitHub. It can propagate itself to other npm packages owned by the user and establish persistence through GitHub actions. Additionally, it poses a risk of destroying the user's home directory, leading to severe data loss and security breaches.

How To Fix

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

npm uninstall @silgi/better-auth

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, ensure that no sensitive tokens or credentials are stored on the affected machine. Rotate any secrets or keys that may have been compromised. Additionally, monitor your GitHub repositories for any unauthorized changes or actions.

Conclusion

The @silgi/better-auth package has been compromised, posing serious security risks to users. Immediate action is required to remove the package and secure any exposed credentials. Regular monitoring and updates are essential to prevent future vulnerabilities.

See every vulnerability recorded for @silgi/better-auth →

Share this vulnerability

FAQ

Immediately uninstall the package using npm uninstall @silgi/better-auth and rotate any credentials that may have been exposed.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without requiring any signup.

The risks include unauthorized access to sensitive information, potential data loss, and the propagation of malicious code to other packages.

Regularly audit your dependencies, use tools like Vulert for monitoring, and keep your packages updated to the latest secure versions.

Investigate the activity immediately, revert any unauthorized changes, and consider enhancing your security measures, such as enabling two-factor authentication.

How To Fix

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

npm uninstall @silgi/better-auth

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