{"id":"MAL-2026-10169","revision":"c4f0c14cfeaf44e8bd8e06cde5d9de66","records":[{"revision":"c4f0c14cfeaf44e8bd8e06cde5d9de66","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-10169","aliases":[],"title":"Malicious code in paysafe-js (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (a1dc1a7847e47ee850fe8a4011ce83950962ab65cc742eb52919d13abe431e59)\npaysafe-js@1.0.0 impersonates a Paysafe payments SDK (package name, description \"Paysafe JavaScript SDK\", and repository URL github.com/paysafe/paysafe-js) but its index.js contains XOR+base64-obfuscated logic that harvests installer secrets. When a consumer invokes the SDK's payments/customers methods with an apiKey configured, the code enumerates process.env, selects keys whose names contain substrings like key/secret/token/pass/auth/api, truncates each value to 100 characters, and POSTs the collected values along with hostname, username, cwd, package name, and call metadata to a hardcoded remote host on port 8443. The C2 hostname is concealed via a base64 + char-shift(-5) + reverse pipeline; HTTP method, headers, path, and env-key filter substrings are hidden with a raw XOR key decoded from base64. A sandbox-evasion gate (CPU count and hostname/username substring checks) and a delayed setTimeout (~26 seconds) precede transmission. Any developer who integrates this package expecting the Paysafe SDK will leak the credential-shaped environment variables of their build or runtime environment to the attacker.\n","state":0,"publishedAt":"2026-07-10T18:37:30+00:00","modifiedAt":"2026-07-10T19:16:57.0750174+00:00","affected":[{"ecosystem":"npm","name":"paysafe-js","ranges":[],"versions":["1.0.0"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/paysafe-js/v/1.0.0"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-10169","license":"OSV · upstream source license applies","key":"osv:MAL-2026-10169","identifiers":["MAL-2026-10169"]},"retained":false,"historicalAffected":[]}],"coverage":[]}