Malicious Code Injection in confused_rat_z3n Package

confused_rat_z3n Updated 24 Nov 2025

Summary

11/11/2025
CRITICAL
No i
Critical
Not published

MAL-2025-100848: Malicious code in confused_rat_z3n (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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The confused_rat_z3n package is part of the npm ecosystem, which is widely used for JavaScript development. This package has been identified as part of a malicious campaign that aims to exploit npm's publishing system. It is designed to automatically generate and publish derivative packages with randomized names, which can inflate developer reputation scores for token rewards in the tea.xyz protocol. The presence of such malicious packages poses a significant risk to developers and users relying on npm for secure package management.

Vulnerability Detail

The vulnerability in the confused_rat_z3n package stems from its malicious payload that modifies the package.json file. It removes private flags, alters version numbers, and generates random package names, leading to the continuous republishing of variants that pollute the npm registry. This behavior can compromise the integrity of the npm ecosystem, making it difficult for developers to trust the packages they use. The origin of this vulnerability is linked to the tea.xyz token reward campaign, which has flooded npm with similar malicious packages.

How To Fix

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

npm uninstall confused_rat_z3n

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 confused_rat_z3n package and replace it with a trusted alternative. Ensure that you review the packages you include in your project and verify their integrity before installation.

Conclusion

The confused_rat_z3n package poses a significant security risk due to its malicious behavior of modifying package.json files and republishing variants. It is crucial for developers to remove this package from their projects and monitor their dependencies for vulnerabilities. Utilizing tools like Vulert can help in maintaining the security of your applications.

See every vulnerability recorded for confused_rat_z3n →

Share this vulnerability

FAQ

The confused_rat_z3n package is an npm package identified as part of a malicious campaign that exploits npm's publishing system.

The vulnerability can compromise the integrity of your project by introducing malicious code that modifies your package.json and republish variants, potentially leading to security risks.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without any signup.

If you have installed the confused_rat_z3n package, you should uninstall it immediately using the command npm uninstall confused_rat_z3n.

Yes, consider using trusted and well-maintained packages that serve the same purpose as confused_rat_z3n, ensuring they are free from vulnerabilities.

How To Fix

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

npm uninstall confused_rat_z3n

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