{"id":"MAL-2026-17199","kind":"package","aliases":["MAL-2026-17199"],"related":[],"title":"Malicious code in scrapetools2 (PyPI)","description":"---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (44124d389269a5e4dc8801d3af1afeb08aee57313fcc7082570c5890e7d89233)\nscrapetools2 1.2.1 ships an auto-update mechanism in downloader.py that fetches tar.gz payloads from public IPFS gateways (eu.orbitor.dev, dget.top, ipfs.filebase.io) at the author-controlled IPNS name k51qzi5uqu5dmh5178x8jzdkz8u3k3qona4zrwlvdr6865it3901l1oe8emjwc, decrypts an 'updates' entry using a Fernet key bundled inside the package (scrapetools2/versions), writes each decrypted blob to scrapetools2/modules/N.py, and then compile()+exec()s them in-process. The updater is invoked via runtime.DBConsumer.startQueue -> updater() and loops on a 60-second interval, so any code path that reaches the advertised RuntimeSite/browser-pool flow triggers the fetch-and-execute cycle. The package additionally ships an encrypted 'updates' blob decrypted by packer.unpackdata into a JSON {\"cmd\":...} whose contents are written to modules/*.py and exec'd by run_modules(); the executed source is not visible in the sdist without the bundled key. Because IPNS is a mutable pointer under the holder's control and the only integrity check is a Fernet key shipped with the package, whoever controls the IPNS name can push arbitrary Python that will be executed on installer hosts.","summary":null,"severity":"critical","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"scrapetools2","fixed":[],"affected":"= 1.2.1; = 1.2.0; = 0.2.0; = 0.2.1","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["malicious","package"],"not_affected_if":[],"how_to_check":null,"fix":null,"status":"open","published_at":"2026-09-27T14:33:48+00:00","first_seen_at":"2026-10-26T20:51:58+00:00","triaged_at":"2026-10-26T21:08:21+00:00","updated_at":"2026-10-26T21:08:21+00:00","category":"package","confidence":null,"triage":null,"analyst_status":null,"analyst_note":null,"search":"'-17199':8A,11A '-2026':7A,10A '1.2.1':30C '44124d389269a5e4dc8801d3af1afeb08aee57313fcc7082570c5890e7d89233':28C '60':97C 'addit':119C 'advertis':107C 'amazon':26C 'amazon-inspector':25C 'arbitrari':189C 'author':53C 'author-control':52C 'auto':34C 'auto-upd':33C 'blob':74C,124C 'bundl':66C,156C 'check':173C 'cmd':131C 'code':2A,102C 'compil':79C 'content':133C 'control':54C,168C,183C 'cycl':116C 'd':141C 'decrypt':58C,73C,125C 'detail':17C 'dget.top':48C 'downloader.py':38C 'edit':20C 'encrypt':122C 'entri':61C 'eu.orbitor.dev':47C 'exec':80C,140C 'execut':115C,146C,194C 'fernet':64C,176C 'fetch':40C,113C 'fetch-and-execut':112C 'flow':109C 'gateway':46C 'holder':166C 'host':197C 'in-process':83C 'insid':67C 'inspector':27C 'instal':196C 'integr':172C 'interv':99C 'invok':89C 'ipf':45C 'ipfs.filebase.io':49C 'ipn':55C,159C,185C 'json':130C 'k51qzi5uqu5dmh5178x8jzdkz8u3k3qona4zrwlvdr6865it3901l1oe8emjwc':57C 'key':65C,157C,177C 'line':23C 'loop':94C 'mal':6A,9A 'malici':1A,13B 'mechan':36C 'modul':137C,144C 'mutabl':162C 'name':56C,186C 'packag':14B,69C,118C,181C 'packer.unpackdata':127C 'path':103C 'payload':42C 'per':15C 'pointer':163C 'process':85C 'public':44C 'push':188C 'py':138C 'pypi':5A 'python':190C 'reach':105C 'run':143C 'runtime.dbconsumer.startqueue':91C 'runtimesite/browser-pool':108C 'scrapetools2':4A,12A,29C 'scrapetools2/modules/n.py':76C 'scrapetools2/versions':70C 'sdist':153C 'second':98C 'ship':31C,120C,178C 'sourc':16C,24C,147C 'tar.gz':41C 'trigger':110C 'updat':35C,60C,87C,92C,123C 'use':62C 'via':90C 'visibl':150C 'whoever':182C 'whose':132C 'without':154C 'write':71C 'written':135C","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"first_public_at":"2026-09-27T14:33:48+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"osv-malicious","external_id":"MAL-2026-17199","url":"https://osv.dev/vulnerability/MAL-2026-17199","severity":"critical","published_at":"2026-09-27T14:33:48+00:00","modified_at":"2026-09-27T14:45:04+00:00","first_seen_at":"2026-10-26T20:51:58+00:00","fetched_at":"2026-10-26T20:51:58+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"}