Malicious code in grafeno-payments (npm)
Description
The npm package 'grafeno-payments' version 1.0.0 contains malicious code executed during installation. Its preinstall script collects environment variables related to credentials, combines them with the host's username and hostname, encodes this data, and exfiltrates it via an unencrypted HTTP request. Additionally, on non-Windows systems, it opens a reverse shell to a remote attacker, allowing full remote code execution on the installer's machine. The malicious behavior is concealed behind a legitimate payments package facade.
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-payments' npm package version 1.0.0 includes a preinstall hook that automatically runs upon 'npm install'. This hook enumerates environment variables for keys containing AWS, TOKEN, KEY, SECRET, PASS, or API, concatenates these with the machine's hostname and username, base64-encodes the resulting data, and exfiltrates it via a curl GET request to a remote IP over plain HTTP. Furthermore, on non-Windows hosts, the script initiates an interactive bash shell redirected to the attacker's server on port 4444, granting the attacker full remote code execution capabilities on the compromised machine. The script suppresses errors to avoid detection during installation. The package's stated purpose as a payments tool is a cover for this credential theft and remote compromise.
Potential Impact
Successful installation of this package leads to theft of sensitive environment credentials and system identifiers, which may include AWS keys and other secrets. Additionally, on non-Windows systems, attackers gain an interactive remote shell with the installer's privileges, enabling full control over the host system. This can lead to further compromise, data exfiltration, and persistence. The malicious activity occurs silently during package installation, increasing the risk of unnoticed compromise.
Mitigation Recommendations
No official patch or remediation is currently documented for this package. Users should avoid installing 'grafeno-payments' version 1.0.0 from untrusted sources. Review and remove this package if already installed. Monitor for suspicious network connections to the indicated IP address and check for unexpected reverse shell activity. Consider rotating any potentially exposed credentials found in environment variables. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-15572
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a936b7eacd9273b49570593
Added to database: 08/29/2026, 23:30:06 UTC
Last enriched: 09/09/2026, 13:08:20 UTC
Last updated: 10/01/2026, 22:30:53 UTC
Views: 95
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.