Malicious code in friendly-greeter-demo (npm)
The npm package friendly-greeter-demo contains malicious code that establishes two independent remote code execution channels. Upon installation, a postinstall script runs a detached daemon that communicates with an attacker-controlled server, sending host identifiers and executing arbitrary shell commands received from the server. Additionally, the main package code triggers the same behavior whenever it is imported or required. This results in full compromise of any system installing or running the package. Secrets and keys on affected systems should be rotated, and the package removed, though full remediation may require rebuilding the system due to potential persistent compromise.
AI Analysis
Technical Summary
The friendly-greeter-demo npm package contains embedded malicious code that activates automatically via two mechanisms: a postinstall.js script that runs on npm install and respawns itself as a detached daemon, and an immediately invoked function expression (IIFE) in index.js that triggers on package import. Both mechanisms communicate with a hardcoded attacker-controlled IP (http://98.86.244.177:8080), registering the host and polling for shell commands to execute. Command outputs and host identifiers are exfiltrated over plain HTTP. This provides an attacker with arbitrary remote code execution on the affected system under the install user's privileges.
Potential Impact
Any system that installs or runs friendly-greeter-demo is fully compromised, as the attacker gains arbitrary remote code execution capabilities. Host identifiers and command outputs are exfiltrated, potentially exposing sensitive information. The attacker can execute arbitrary shell commands, leading to complete system takeover. All secrets and keys stored on the compromised system should be considered exposed and rotated immediately from a clean environment.
Mitigation Recommendations
No official patch or fix is available for this malicious package. The recommended mitigation is to immediately remove the friendly-greeter-demo package from all affected systems. Due to the nature of the compromise, full system remediation may require rebuilding the affected machines from trusted sources. All secrets and credentials stored on compromised systems should be rotated from a separate, secure environment. Monitor for any signs of persistent compromise or additional malware.
Malicious code in friendly-greeter-demo (npm)
Description
The npm package friendly-greeter-demo contains malicious code that establishes two independent remote code execution channels. Upon installation, a postinstall script runs a detached daemon that communicates with an attacker-controlled server, sending host identifiers and executing arbitrary shell commands received from the server. Additionally, the main package code triggers the same behavior whenever it is imported or required. This results in full compromise of any system installing or running the package. Secrets and keys on affected systems should be rotated, and the package removed, though full remediation may require rebuilding the system due to potential persistent compromise.
Affected software
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
Technical Analysis
The friendly-greeter-demo npm package contains embedded malicious code that activates automatically via two mechanisms: a postinstall.js script that runs on npm install and respawns itself as a detached daemon, and an immediately invoked function expression (IIFE) in index.js that triggers on package import. Both mechanisms communicate with a hardcoded attacker-controlled IP (http://98.86.244.177:8080), registering the host and polling for shell commands to execute. Command outputs and host identifiers are exfiltrated over plain HTTP. This provides an attacker with arbitrary remote code execution on the affected system under the install user's privileges.
Potential Impact
Any system that installs or runs friendly-greeter-demo is fully compromised, as the attacker gains arbitrary remote code execution capabilities. Host identifiers and command outputs are exfiltrated, potentially exposing sensitive information. The attacker can execute arbitrary shell commands, leading to complete system takeover. All secrets and keys stored on the compromised system should be considered exposed and rotated immediately from a clean environment.
Mitigation Recommendations
No official patch or fix is available for this malicious package. The recommended mitigation is to immediately remove the friendly-greeter-demo package from all affected systems. Due to the nature of the compromise, full system remediation may require rebuilding the affected machines from trusted sources. All secrets and credentials stored on compromised systems should be rotated from a separate, secure environment. Monitor for any signs of persistent compromise or additional malware.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5704
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-47h6-x596-wmmx"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a577ed568715ace43b3f87b
Added to database: 07/15/2026, 12:36:37 UTC
Last enriched: 07/15/2026, 12:45:11 UTC
Last updated: 07/26/2026, 14:44:42 UTC
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.