{"id":"MAL-2026-15862","kind":"package","aliases":["MAL-2026-15862"],"related":[],"title":"Malicious code in py-2equests (PyPI)","description":"---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (9bd7b93cf88d0fbcca30c50d9c9de6e14134cd2890be5a7a785e9330e98a988c)\npy-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.\n\n## Source: kam193 (e77ec1203f9d490621144227c797d33bf3271c674bcc248fbaf16aaeca9bd106)\nDuring import, the code exfiltrates potentially sensitive env variables. In all analyzed versions the exfiltration target was a localhost, suggesting it was just a test.\n\n\n---\n\nCategory: 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.\n\n\nCampaign: 2026-09-0requests\n\n\nReasons (based on the campaign):\n\n\n - exfiltration-env-variables\n\n\n - typosquatting","summary":null,"severity":"critical","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"py-2equests","fixed":[],"affected":"= 0.0.1","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["malicious","package"],"not_affected_if":[],"how_to_check":null,"fix":null,"status":"open","published_at":"2026-09-03T17:01:50+00:00","first_seen_at":"2026-10-26T20:51:56+00:00","triaged_at":"2026-10-26T21:12:36+00:00","updated_at":"2026-10-26T21:12:36+00:00","category":"package","confidence":null,"triage":null,"analyst_status":null,"analyst_note":null,"search":"'-0':259C '-09':258C '-15862':10A,13A '-2026':9A,12A '127.0.0.1':90C '2':45C '2026':257C '2equests':6A,16A,35C,51C,167C '9999':91C '9bd7b93cf88d0fbcca30c50d9c9de6e14134cd2890be5a7a785e9330e98a988c':32C 'access':192C 'also':237C 'amazon':30C 'amazon-inspector':29C 'analyz':213C 'anyth':238C 'api':69C 'author':142C 'back':116C 'base':262C 'bodi':57C 'campaign':256C,265C 'categori':227C 'channel':138C 'clear':251C 'cli':164C 'co':249C 'code':2A,150C,205C 'collect':61C,101C 'comment':143C,151C 'configur':197C 'connect':115C 'control':195C 'credenti':184C 'credential-shap':183C 'default':88C 'describ':139C 'destin':97C,198C 'detail':21C 'document':173C 'e77ec1203f9d490621144227c797d33bf3271c674bcc248fbaf16aaeca9bd106':201C 'edit':24C 'env':154C,209C,268C 'environ':86C,186C 'exfiltr':153C,206C,216C,267C 'exfiltration-env-vari':266C 'explor':243C 'grant':189C 'harm':254C 'hold':129C 'hook':148C 'host':121C 'host/port':80C 'host/ts_port':85C 'import':49C,107C,179C,203C 'inspector':31C 'instal':161C,168C 'intent':175C 'iter':58C 'kam193':200C 'key':65C,72C 'kit':247C 'leak':182C 'level':55C 'like':232C,241C 'line':27C 'liter':126C 'localhost':220C 'look':231C,240C 'low':253C 'low-harm':252C 'mal':8A,11A 'malici':1A,17B 'modul':56C 'open':74C,132C,157C 'os.environ':59C 'overrid':93C 'packag':18B,43C,181C,230C,235C 'path':108C 'pentest':229C,234C 'per':19C 'popular':41C 'port':123C 'possibl':255C 'potenti':207C 'pre':245C 'pre-prepar':244C 'prepar':246C 'print':165C 'probabl':228C 'process':177C 'py':5A,15A,34C,50C,166C 'py-2equests':4A,14A,33C 'pypi':7A 'python':112C 'r':47C 'read':152C 'reason':261C 'remot':96C,190C 'request':42C,170C,260C 'research':248C 'revers':136C,146C,158C 'reverse-shel':135C 'secret':68C,102C 'self':172C 'self-docu':171C 'send':99C,124C 'sensit':208C 'shape':185C 'shell':127C,137C,147C,159C,191C 'socket':77C,131C 'sourc':20C,28C,199C 'spawn':110C 'start':66C 'subprocess':113C 'substitut':44C 'suggest':221C 'taken':81C 'target':169C,217C 'tcp':76C 'test':226C,242C 'token':70C 'top':54C 'top-level':53C 'ts':84C,120C,122C 'typic':233C 'typosquat':38C,270C 'var':155C 'variabl':63C,87C,187C,210C,269C 'version':214C 'whoever':194C 'whose':64C","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"first_public_at":"2026-09-03T17:01:50+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"osv-malicious","external_id":"MAL-2026-15862","url":"https://osv.dev/vulnerability/MAL-2026-15862","severity":"critical","published_at":"2026-09-03T17:01:50+00:00","modified_at":"2026-09-04T01:00:06+00:00","first_seen_at":"2026-10-26T20:51:56+00:00","fetched_at":"2026-10-26T20:51:56+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}