MAL-2026-6928

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/paysafe-payments/MAL-2026-6928.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-6928
Published
2026-07-07T15:22:35Z
Modified
2026-07-08T21:46:53Z
Summary
Malicious code in paysafe-payments (PyPI)
Details

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

Source: amazon-inspector (7e2b7f287703755dab866acf1047a148e321d06a84353238936eaba58b6e7fda)

Package impersonates the Paysafe payments SDK (metadata claims 'Paysafe Developer Team', 'Paysafe Payments processing library') but its advertised PaysafeClient.create_payment() method never contacts api.paysafe.com. Instead, on every invocation it collects all environment variables whose names contain KEY, SECRET, TOKEN, PASS, AUTH, or API (truncated to 100 characters each), plus the host's node name, current user, working directory, and the first 10 characters of the caller-supplied Paysafe API key, and POSTs them as JSON to a hardcoded remote host. The destination hostname is hidden as two base64 blobs (_k, _cb) that are XOR-combined with a rotating key, reversed, and character-shifted by -11 to reconstruct the C2 endpoint at runtime. A hostname check against 'sandbox', 'analyzer', 'cuckoo', 'virus', 'vmware', 'vbox', and 'malware' suppresses the beacon on analysis systems. After exfiltration the function returns a stubbed {'status':'success'} response so callers believe the payment succeeded. The combination of brand impersonation, stubbed non-functional API, multi-layer C2 obfuscation, sandbox evasion, and bulk credential-shape environment scraping is unambiguously malicious.

Source: kam193 (cc8e13806589e7fbb3dbe284624b88d6de8c030f32c04c20f8c76af059f33515)

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

Database specific
{
    "iocs": {
        "domains": [
            "caliber-spinner-finishing.ngrok-free.dev"
        ]
    },
    "malicious-packages-origins": [
        {
            "id": "pypi/2026-07-paysafe-api/paysafe-payments",
            "import_time": "2026-07-07T15:30:57.593031525Z",
            "modified_time": "2026-07-07T15:22:35.970045Z",
            "sha256": "cc8e13806589e7fbb3dbe284624b88d6de8c030f32c04c20f8c76af059f33515",
            "source": "kam193",
            "versions": [
                "1.0.0"
            ]
        },
        {
            "id": "pypi/2026-07-paysafe-api/paysafe-payments",
            "import_time": "2026-07-07T22:55:28.726723418Z",
            "modified_time": "2026-07-07T15:22:35.970045Z",
            "sha256": "f36b53b707131144693edb59b95fe127d3b0dbbcd621691792247e3e9a33428c",
            "source": "kam193",
            "versions": [
                "1.0.0"
            ]
        },
        {
            "id": "IN-MAL-2026-008602",
            "import_time": "2026-07-08T21:27:49.618455649Z",
            "modified_time": "2026-07-08T20:34:47Z",
            "sha256": "7e2b7f287703755dab866acf1047a148e321d06a84353238936eaba58b6e7fda",
            "source": "amazon-inspector",
            "versions": [
                "1.0.0"
            ]
        }
    ]
}
References
Credits

Affected packages

PyPI / paysafe-payments

Package

Name
paysafe-payments
View open source insights on deps.dev
Purl
pkg:pypi/paysafe-payments

Affected ranges

Affected versions

1.*
1.0.0

Database specific

cwes
[
    {
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature.",
        "name": "Embedded Malicious Code"
    }
]
indicators
{
    "evidence_files": [
        {
            "path": "paysafe_payments/__init__.py",
            "sha256": "b04daeacd1d1c9020cce2a97fa7af83dbedf4e6d17dd12c0f337f32240399785",
            "tlsh": "f531c8d12440744a91662e2b848d2995e34ffd040cafde4bffb0ab466f80573c438d28"
        },
        {
            "path": "setup.py",
            "sha256": "554a192422ed299feffef7d436ab3b3a3d5b1d97bd2cd812fd9d8606581c9e44",
            "tlsh": "53d05ea108a163256ad0cad6185710974f3aea363f6194d5bbbc56942f924a30a1611a"
        }
    ],
    "package_integrity": [
        {
            "filename": "paysafe_payments-1.0.0-py3-none-any.whl",
            "hashes": {
                "blake2b_256": "21fec14fff7f392db650ce03c472077c2010e347e364cfd02b4247746bd5c95b",
                "md5": "5911571bce7fbd4d8f7baf4baf214d8d",
                "sha256": "edde4f45780c0874cbca4f3bad04f15940253e90d788d58d4f1e4ced4f47113c"
            }
        },
        {
            "filename": "paysafe_payments-1.0.0.tar.gz",
            "hashes": {
                "blake2b_256": "b0782f1633554967c3a34e4b083684d2d6a98a40e1cb2e44fda2983dc62a0563",
                "md5": "cd7372a0a0cc8bdad948403080d9240f",
                "sha256": "d4a6fad955ed4553618fcfe01f5d1329a4f47a2d92de6f55b244b06a754377ce"
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/paysafe-payments/MAL-2026-6928.json"