Skip to main content

Malicious code in 0nestjs (npm)

0
Critical
Published: 09/03/2026 (09/03/2026, 23:35:53 UTC)
Source: GCVE Database
Product: 0nestjs

Description

The npm package '0nestjs' version 0.0.1 is a malicious typosquatting package targeting developers who mistype 'nestjs'. Upon installation, it executes a postinstall script that harvests environment variables containing secrets and sends them to a remote attacker-controlled server. It also establishes a reverse shell connection to the attacker, allowing interactive command execution on the victim's machine.

Affected software

npmghsa
0nestjs
Affected versions
=0.0.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/07/2026, 17:29:30 UTC

Technical Analysis

The '0nestjs' package (version 0.0.1) is a malicious npm package designed to exploit developers who accidentally install it instead of the legitimate 'nestjs' package. Its postinstall hook runs 'node index.js', which collects environment variables matching /^(SECRET|API|TOKEN|KEY)/ and sends them as JSON to a hardcoded IP address (84.32.22.44) on port 9999. Additionally, it uses 'nc -e /bin/sh' to open a reverse shell to the same endpoint, granting the attacker remote command execution capabilities. The package.json explicitly identifies the package as a typosquat with author 'typosquat-bot'. This behavior was identified by Amazon Inspector and the OpenSSF Package Analysis project, confirming its malicious nature.

Potential Impact

Successful installation of this package results in disclosure of sensitive environment variables (such as secrets, API keys, tokens) to a remote attacker. Furthermore, the attacker gains interactive shell access on the victim's machine, enabling arbitrary command execution. This can lead to full system compromise, data theft, and further malicious activity.

Mitigation Recommendations

Avoid installing packages with suspicious or typo-like names. Verify package names carefully before installation. Remove the '0nestjs' package if installed. Since no official patch or fix exists for this malicious package, remediation involves uninstalling the package and rotating any potentially exposed secrets. Use trusted package sources and consider enabling package integrity verification tools. Monitor for any unauthorized access resulting from this compromise.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-15908
Osv Schema Version
1.7.4
Ecosystems
["npm"]

Threat ID: 6a9ad4edacd9273b49b677c2

Added to database: 09/04/2026, 14:25:49 UTC

Last enriched: 09/07/2026, 17:29:30 UTC

Last updated: 10/01/2026, 23:04:07 UTC

Views: 26

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses