{"id":"MAL-2026-15861","kind":"package","aliases":["MAL-2026-15861"],"related":[],"title":"Malicious code in py-1requests (PyPI)","description":"---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (bd6d1a5c78d4368dc76a90cc90a68e4264170ed9ef208c8096251798734bb0d6)\npy_1requests is a typosquat of the popular `requests` library (leading `1` inserted inside the name). On import, py_1requests/__init__.py iterates os.environ and collects every variable whose name starts with SECRET, API, TOKEN, or KEY, then opens a TCP socket to HOST:PORT and sends the serialized dict; HOST and PORT default to 127.0.0.1:9999 but are overridable via the TS_HOST and TS_PORT environment variables. The same __init__.py spawns a python subprocess that connects to the same host/port and sends a 'SHELL' marker, holding the connection open — a reverse-shell staging path. cli.py prints 'py_1requests installed -- targeting requests' and __init__.py prints '[typosquat] exfiltrating:...', in-source admissions of purpose. Both behaviors fire unconditionally on import with no documented purpose.\n\n## Source: kam193 (877b4b612041848c46e9fb32160b85b74e7c3e983a38313017bc8c034e5f93da)\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-1requests","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:02:02+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':218C '-09':217C '-15861':10A,13A '-2026':9A,12A '1':44C '127.0.0.1':86C '1requests':6A,16A,34C,132C '1requests/__init__.py':52C '2026':216C '877b4b612041848c46e9fb32160b85b74e7c3e983a38313017bc8c034e5f93da':160C '9999':87C 'admiss':145C 'also':196C 'amazon':30C 'amazon-inspector':29C 'analyz':172C 'anyth':197C 'api':64C 'base':221C 'bd6d1a5c78d4368dc76a90cc90a68e4264170ed9ef208c8096251798734bb0d6':32C 'behavior':149C 'campaign':215C,224C 'categori':186C 'clear':210C 'cli.py':129C 'co':208C 'code':2A,164C 'collect':56C 'connect':109C,121C 'default':84C 'detail':21C 'dict':80C 'document':156C 'edit':24C 'env':168C,227C 'environ':98C 'everi':57C 'exfiltr':141C,165C,175C,226C 'exfiltration-env-vari':225C 'explor':202C 'fire':150C 'harm':213C 'hold':119C 'host':74C,81C,94C 'host/port':113C 'import':50C,153C,162C 'in-sourc':142C 'init':102C,137C 'insert':45C 'insid':46C 'inspector':31C 'instal':133C 'iter':53C 'kam193':159C 'key':67C 'kit':206C 'lead':43C 'librari':42C 'like':191C,200C 'line':27C 'localhost':179C 'look':190C,199C 'low':212C 'low-harm':211C 'mal':8A,11A 'malici':1A,17B 'marker':118C 'name':48C,60C 'open':69C,122C 'os.environ':54C 'overrid':90C 'packag':18B,189C,194C 'path':128C 'pentest':188C,193C 'per':19C 'popular':40C 'port':75C,83C,97C 'possibl':214C 'potenti':166C 'pre':204C 'pre-prepar':203C 'prepar':205C 'print':130C,139C 'probabl':187C 'purpos':147C,157C 'py':5A,15A,33C,51C,103C,131C,138C 'py-1requests':4A,14A 'pypi':7A 'python':106C 'reason':220C 'request':41C,135C,219C 'research':207C 'revers':125C 'reverse-shel':124C 'secret':63C 'send':77C,115C 'sensit':167C 'serial':79C 'shell':117C,126C 'socket':72C 'sourc':20C,28C,144C,158C 'spawn':104C 'stage':127C 'start':61C 'subprocess':107C 'suggest':180C 'target':134C,176C 'tcp':71C 'test':185C,201C 'token':65C 'ts':93C,96C 'typic':192C 'typosquat':37C,140C,229C 'uncondit':151C 'variabl':58C,99C,169C,228C 'version':173C 'via':91C 'whose':59C","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"first_public_at":"2026-09-03T17:02:02+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"osv-malicious","external_id":"MAL-2026-15861","url":"https://osv.dev/vulnerability/MAL-2026-15861","severity":"critical","published_at":"2026-09-03T17:02:02+00:00","modified_at":"2026-09-04T01:00:05+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"}