Malicious code in paysafe-node (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (2877a8bf5626e24e7e65c02d1ba6d5f27be7d7367079e0e3065f95775e31f7f7) The package presents itself as a Node.js client for the Paysafe REST API but its main entry ships an XOR-obfuscated stealer. When any advertised SDK method (payments.create/get, customers.create/get) is invoked, a delayed callback runs an exfiltration routine that enumerates process.env, selects every variable whose name contains 'key', 'secret', 'token', 'pass', 'auth', or 'api', truncates each value to 100 characters, and POSTs those values together with the machine hostname, OS username, current working directory, timestamp, package identifier, and a prefix of the caller-supplied Paysafe apiKey to a hardcoded remote host on TCP/8443. The destination hostname, HTTP verb, header names, env-var selector substrings, and sandbox-detection tokens are all hidden via Buffer XOR against a hardcoded 16-byte base64 key, with the hostname additionally char-shifted and reversed. Before firing, a guard aborts exfiltration when os.cpus().length < 2 or when the hostname/username matches obfuscated sandbox/VM/analysis tokens, so the payload only ships from real developer and CI machines. There is no configuration option, README disclosure, or opt-out for this network activity, and the destination is unrelated to the installer's Paysafe account. Name-impersonation of the legitimate Paysafe SDK, credential-shaped env scraping well beyond a payments SDK's needs, string obfuscation covering every identifier, and analyst-host evasion together satisfy the active-attack shape.
AI Analysis
Technical Summary
The paysafe-node package (version 1.0.0) is a malicious npm package impersonating a legitimate Paysafe SDK. Its main entry point contains XOR-obfuscated code that, upon invocation of any advertised SDK method, triggers a delayed callback to exfiltrate sensitive environment variables (those containing 'key', 'secret', 'token', 'pass', 'auth', or 'api') truncated to 100 characters. It also collects machine hostname, OS username, current working directory, timestamp, package identifier, and part of the caller-supplied Paysafe apiKey, sending all this data via POST to a hardcoded remote server on TCP port 8443. The exfiltration destination and network details are obfuscated using XOR and character transformations. The payload includes sandbox and VM evasion by checking CPU count and matching hostname/username against obfuscated tokens. No configuration or disclosure is provided to users, indicating an active attack rather than a vulnerability or misconfiguration.
Potential Impact
Sensitive credentials and environment information are exfiltrated to an attacker-controlled server without user knowledge or consent. This can lead to compromise of API keys, secrets, tokens, and potentially broader system access or data breaches. The malicious code targets developer and CI environments by evading sandbox and VM detection, increasing the risk of credential theft in real development workflows.
Mitigation Recommendations
No official patch or remediation is available for this malicious package. Users should immediately remove paysafe-node version 1.0.0 from their projects and replace it with a verified legitimate SDK from trusted sources. Audit environments for any signs of credential exfiltration and rotate any potentially exposed secrets. Avoid using untrusted or impersonating packages from public repositories.
Malicious code in paysafe-node (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (2877a8bf5626e24e7e65c02d1ba6d5f27be7d7367079e0e3065f95775e31f7f7) The package presents itself as a Node.js client for the Paysafe REST API but its main entry ships an XOR-obfuscated stealer. When any advertised SDK method (payments.create/get, customers.create/get) is invoked, a delayed callback runs an exfiltration routine that enumerates process.env, selects every variable whose name contains 'key', 'secret', 'token', 'pass', 'auth', or 'api', truncates each value to 100 characters, and POSTs those values together with the machine hostname, OS username, current working directory, timestamp, package identifier, and a prefix of the caller-supplied Paysafe apiKey to a hardcoded remote host on TCP/8443. The destination hostname, HTTP verb, header names, env-var selector substrings, and sandbox-detection tokens are all hidden via Buffer XOR against a hardcoded 16-byte base64 key, with the hostname additionally char-shifted and reversed. Before firing, a guard aborts exfiltration when os.cpus().length < 2 or when the hostname/username matches obfuscated sandbox/VM/analysis tokens, so the payload only ships from real developer and CI machines. There is no configuration option, README disclosure, or opt-out for this network activity, and the destination is unrelated to the installer's Paysafe account. Name-impersonation of the legitimate Paysafe SDK, credential-shaped env scraping well beyond a payments SDK's needs, string obfuscation covering every identifier, and analyst-host evasion together satisfy the active-attack shape.
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 paysafe-node package (version 1.0.0) is a malicious npm package impersonating a legitimate Paysafe SDK. Its main entry point contains XOR-obfuscated code that, upon invocation of any advertised SDK method, triggers a delayed callback to exfiltrate sensitive environment variables (those containing 'key', 'secret', 'token', 'pass', 'auth', or 'api') truncated to 100 characters. It also collects machine hostname, OS username, current working directory, timestamp, package identifier, and part of the caller-supplied Paysafe apiKey, sending all this data via POST to a hardcoded remote server on TCP port 8443. The exfiltration destination and network details are obfuscated using XOR and character transformations. The payload includes sandbox and VM evasion by checking CPU count and matching hostname/username against obfuscated tokens. No configuration or disclosure is provided to users, indicating an active attack rather than a vulnerability or misconfiguration.
Potential Impact
Sensitive credentials and environment information are exfiltrated to an attacker-controlled server without user knowledge or consent. This can lead to compromise of API keys, secrets, tokens, and potentially broader system access or data breaches. The malicious code targets developer and CI environments by evading sandbox and VM detection, increasing the risk of credential theft in real development workflows.
Mitigation Recommendations
No official patch or remediation is available for this malicious package. Users should immediately remove paysafe-node version 1.0.0 from their projects and replace it with a verified legitimate SDK from trusted sources. Audit environments for any signs of credential exfiltration and rotate any potentially exposed secrets. Avoid using untrusted or impersonating packages from public repositories.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10171
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a520ebf68715ace438f599d
Added to database: 07/11/2026, 09:37:03 UTC
Last enriched: 07/11/2026, 09:54:12 UTC
Last updated: 07/28/2026, 13:03:30 UTC
Views: 36
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.