Malicious code in grafeno-auth (npm)
Description
The npm package 'grafeno-auth' version 1.0.0 contains malicious code executed during installation. It uses a preinstall lifecycle hook to download and execute a shell script from an attacker-controlled HTTP server, then sets up a cron job to repeatedly fetch and run this script every 30 minutes. The package's main code is inert, making the lifecycle hook the primary malicious behavior.
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 'grafeno-auth' npm package version 1.0.0 declares a preinstall hook that executes a shell command to curl a script from a bare IP HTTP endpoint (http://216.126.236.46/x.sh) and pipes it to sh, thereby running attacker-controlled code on the host during installation. Additionally, it appends a crontab entry to re-execute this script every 30 minutes, establishing persistent remote code execution. The package's index.js exports a no-op login function, indicating the lifecycle hook is the only active malicious component. This behavior was identified by Amazon Inspector and the OpenSSF Package Analysis project, classifying the package as malicious.
Potential Impact
Installing the 'grafeno-auth' package version 1.0.0 results in execution of arbitrary attacker-controlled code on the host system at install time and persistently every 30 minutes thereafter via a cron job. This can lead to full compromise of the affected system, allowing the attacker to run any commands or payloads remotely. The malicious payload is mutable by the attacker, increasing risk over time.
Mitigation Recommendations
No official patch or remediation is currently available for this package version. Users should avoid installing 'grafeno-auth' version 1.0.0. Remove any installations of this package and any associated cron jobs immediately. Monitor systems for unauthorized cron entries and network connections to the indicated IP address. Consider using trusted package sources and scanning dependencies for malicious behavior before installation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-15502
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a92f7e2acd9273b49e75bf8
Added to database: 08/29/2026, 15:16:50 UTC
Last enriched: 09/09/2026, 21:08:41 UTC
Last updated: 10/04/2026, 04:19:23 UTC
Views: 22
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.
External Links
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.