MAL-2026-15862

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/py-2equests/MAL-2026-15862.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-15862
Published
2026-09-03T17:01:50Z
Modified
2026-09-04T01:00:06Z
Summary
Malicious code in py-2equests (PyPI)
Details

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

Source: amazon-inspector (9bd7b93cf88d0fbcca30c50d9c9de6e14134cd2890be5a7a785e9330e98a988c)

py-2equests is a typosquat of the popular 'requests' package (substituting '2' for 'r'). On import py_2equests, the top-level module body iterates os.environ and collects all variables whose keys start with SECRET, API, TOKEN, or KEY, then opens a TCP socket to a host/port taken from the TS_HOST/TS_PORT environment variables (defaulting to 127.0.0.1:9999 but overridable to any remote destination) and sends the collected secrets over it. The same import path then spawns a python subprocess that connects back to the same TS_HOST:TS_PORT, sends the literal 'SHELL', and holds the socket open as a reverse-shell channel, described in an author comment as a 'reverse shell hook'. A code comment reads 'Exfiltrate env vars and open reverse shell on install' and the CLI prints 'py_2equests installed -- targeting requests', self-documenting the intent. Any process that imports the package leaks credential-shaped environment variables and grants remote shell access to whoever controls the configured destination.

Source: kam193 (e77ec1203f9d490621144227c797d33bf3271c674bcc248fbaf16aaeca9bd106)

During import, the code exfiltrates potentially sensitive env variables. In all analyzed versions the exfiltration target was a localhost, suggesting it was just a test.


Category: PROBABLY_PENTEST - Packages looking like typical pentest packages, but also anything that looks like testing, exploring pre-prepared kits, research & co, with clearly low-harm possibilities.

Campaign: 2026-09-0requests

Reasons (based on the campaign):

  • exfiltration-env-variables

  • typosquatting

Database specific
{
    "malicious-packages-origins":  [
        {
            "id":  "pypi/2026-09-0requests/py-2equests",
            "import_time":  "2026-09-03T17:16:47.037286544Z",
            "modified_time":  "2026-09-03T17:01:50.51128Z",
            "sha256":  "e77ec1203f9d490621144227c797d33bf3271c674bcc248fbaf16aaeca9bd106",
            "source":  "kam193",
            "versions":  [
                "0.0.1"
            ]
        },
        {
            "id":  "IN-MAL-2026-019378",
            "import_time":  "2026-09-04T00:45:54.318499958Z",
            "modified_time":  "2026-09-03T23:49:01Z",
            "sha256":  "9bd7b93cf88d0fbcca30c50d9c9de6e14134cd2890be5a7a785e9330e98a988c",
            "source":  "amazon-inspector",
            "versions":  [
                "0.0.1"
            ]
        }
    ]
}
References
Credits

Affected packages

PyPI / py-2equests

Package

Name
py-2equests
View open source insights on deps.dev
Purl
pkg:pypi/py-2equests

Affected ranges

Affected versions

0.*
0.0.1

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":  "py_2equests/__init__.py",
            "sha256":  "b2a6588476f40845a2df173d57d436dc47c0dfd044bcffdc936be1b509cffd3d",
            "tlsh":  "00111ee2e859092d307a67428527503da3b3d2415b35680277b85e32af37ba8307a6b8"
        }
    ],
    "package_integrity":  [
        {
            "filename":  "py_2equests-0.0.1-py3-none-any.whl",
            "hashes":  {
                "blake2b_256":  "ae7abbbc0c3cafea1141b6f05493592ccc639da2e8068cdb6346c957e0659aaa",
                "md5":  "e75ed3e1f281ef7fa58dc6562f3bdb1b",
                "sha256":  "9fa4dd3ec0b6eb1ac11f51898d1363313a34371dabb5178a858675b6e859abf1"
            }
        },
        {
            "filename":  "py_2equests-0.0.1.tar.gz",
            "hashes":  {
                "blake2b_256":  "ed73029459271648afc30887b464f5775b5ac799c69521a02c7a3f33f20ddcf9",
                "md5":  "577abf03376ee927ce140afa1a2d5e0e",
                "sha256":  "5095d0802783fd0197c34885b2c4d0d197317cc636f9e5e8532ff4ceb17292ea"
            }
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/pypi/py-2equests/MAL-2026-15862.json"