Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in weight2loss (npm)

0
Critical
Published: 08/06/2026 (08/06/2026, 23:54:44 UTC)
Source: GCVE Database
Product: weight2loss

Description

The npm package 'weight2loss' version 1.0.5 contains malicious code in a setup.js file referenced by a postinstall hook. This code, if executed, steals sensitive credentials from the installer environment, exfiltrates them to an attacker-controlled server and email, downloads and executes additional malicious scripts, establishes persistent remote access via a cron job, and deletes itself to evade detection. The postinstall hook is misconfigured and does not auto-run on install in this exact version, but the malicious payload is fully functional if manually invoked or if the manifest is corrected. The package's stated purpose does not align with its malicious behavior.

Affected software

npmghsa
weight2loss
Affected versions
=1.0.5

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: 08/07/2026, 07:43:44 UTC

Technical Analysis

The 'weight2loss' npm package version 1.0.5 includes a malicious setup.js script referenced by a postinstall hook that is currently misdeclared and thus not automatically executed by npm. If executed, this script reads sensitive installer-side secrets from configuration files and environment variables, exfiltrates this data via HTTP POST requests to a hardcoded URL and by email using attacker credentials, downloads and runs additional malicious scripts for arbitrary code execution, installs a cron job for persistent remote command execution, and removes the setup.js file to hinder forensic analysis. The malicious behavior is unrelated to the package's declared fitness analytics functionality.

Potential Impact

If the malicious setup.js script is executed, attacker-controlled code can steal sensitive credentials including tokens and keys from the user's environment, exfiltrate environment variables, execute arbitrary commands via downloaded scripts, and maintain persistent remote access through a cron job. This compromises the confidentiality and integrity of the affected system and any connected services using the stolen credentials. However, in the current package version, the postinstall hook is misconfigured and does not auto-run, reducing immediate risk unless the script is manually invoked or the manifest is corrected.

Mitigation Recommendations

Currently, the malicious postinstall script is not automatically executed due to a misconfigured postinstall hook in package.json. Users should avoid manually invoking setup.js or modifying the manifest to enable its execution. Since no official patch or advisory is provided, users should avoid using version 1.0.5 of 'weight2loss' entirely. Monitor for updates or vendor advisories for remediation. Consider removing the package if already installed and scanning systems for signs of compromise related to the described behaviors.

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-13485
Osv Schema Version
1.7.4
Aliases
[]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a7573b5bf8831d539d93aa5

Added to database: 08/07/2026, 05:57:09 UTC

Last enriched: 08/07/2026, 07:43:44 UTC

Last updated: 08/07/2026, 07:43:44 UTC

Views: 2

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