MAL-2026-6927

    Dashboard / Malicious Package / MAL-2026-6927

    MAL-2026-6927

    Published: 7 Jul 2026Last Modified: 8 Jul 2026

    Summary: Malicious code in paysafe-kyc (PyPI)

    Details: 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

    Affected packages

    Package

    Name: paysafe-kyc

    Purl: pkg:pypi/paysafe-kyc

    Affected ranges

    Type: N/A

    Events:

    Introduced- None
    Fixed -None

    Affected versions

    1.0.0