Advisory

MAL-2026-6927

Also known as: None

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

Summary

Malicious code in paysafe-kyc (PyPI)

Details

---
_-= Per source details. Do not edit below this line.=-_

Source: amazon-inspector (8c619e500f8070a5525694f42547c0b73e8189965f8816f1a124190f50bed6f5)
The paysafe-kyc package impersonates a legitimate Paysafe KYC/payments SDK (author string 'Paysafe Developer Team', base URL https://api.paysafe.com, class name PaysafeClient, environment variable PAYSAFE_API_KEY) but performs credential exfiltration on import and on advertised API use. At import time, the module iterates os.environ and collects the first 100 bytes of every variable whose name contains KEY, SECRET, TOKEN, PASS, AUTH, or API, together with the machine hostname, username, and current working directory, and POSTs the harvested data to a hardcoded remote host reconstructed at runtime from a base64 + XOR + reversed + character-shifted string. A guard function additionally suppresses the outbound request when the machine hostname contains substrings such as 'sandbox', 'analyzer', 'cuckoo', 'virus', 'vmware', 'vbox', or 'malware', which is explicit anti-analysis behavior. The PaysafeClient.create_payment method sleeps 12 seconds and then covertly forwards a prefix of the caller-supplied PAYSAFE_API_KEY to the same hidden endpoint, so any developer using the SDK as documented has their Paysafe API key mirrored to the attacker in addition to the real Paysafe API. The combination of brand impersonation, import-time environment credential harvest, silent relay of caller-provided API keys, obfuscated C2 hostname, and sandbox-hostname evasion is unambiguous supply-chain attack behavior.

Source: kam193 (7089650efc5360b819e8831801bcedf6489945f5b563729e99f036461bd59092)
When using a provided class, the code exfiltrates basic data and parts of sensitive env variables to a remote host.

---

Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.

Campaign: 2026-07-paysafe-api

Reasons (based on the campaign):

  • exfiltration-env-variables
  • dependency-confusion
  • action-hidden-in-lib-usage
  • The package contains code to detect if it is running in a sandbox environment.
  • obfuscation

Severity

Not rated by the source.

Dates

Published
2026-07-07 15:22 UTC
Modified
2026-07-08 15:31 UTC

Affected packages and fixes

paysafe-kyc

PyPI · All systems

Affected

  • Versions: 1.0.0

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences