{"id":"CVE-2026-118938","kind":"vulnerability","aliases":["CVE-2026-118938"],"related":[],"title":"fickling: crafted pickle bypasses safety check and runs code","description":"In Trail of Bits fickling through 0.1.12, a pickle STACK_GLOBAL operand carrying a dotted __qualname__ (for example \"Values.read_file\") is resolved by pickle's find_class through _getattribute to an arbitrary attribute path rather than to a module-level function. Fickling records only the leading component of the name in its import tracking and renders the operation as a plain import (for instance, 'python -m fickling' displays it as 'from optparse import Values.read_file'), so the trailing attribute reference is never analyzed as a call. The OvertlyBadEvals analysis pass does not flag it, and check_safety() returns LIKELY_SAFE with zero findings. This allows an attacker to reach a class method that performs code execution: optparse.Values.read_file executes exec(open(filename).read(), vars), achieving arbitrary code execution when the crafted pickle is loaded through fickling.load(), which chains check_safety() into pickle.loads() as an explicit security gate. optparse is present in all current CPython 3.x releases (deprecated as of Python 3.13, not removed). This weakness is in the resolution and analysis of dotted attribute-path names, and is distinct from and independently fixable from the module-origin trust weakness tracked as CVE-2026-16760: resolving or flagging dotted attribute-path imports closes this vector while leaving the module-level trust behavior unchanged. This bypass was verified to remain present on the vendor master branch at commit d011709 as of 2026-10-30, after the vendor's October blocklist additions and a new heuristic that flags private stdlib attributes; because the public class method Values.read_file is neither blocklisted nor flagged as a private attribute, it is not addressed by those remediations.","summary":"Trail of Bits' fickling, a pickle safety scanner, can be fooled by a pickle file with a dotted name that reaches optparse.Values.read_file, which executes code. An attacker who supplies a crafted pickle gets arbitrary code execution on a system that loads it after check_safety() reports it as safe.","severity":"high","cvss":8.8,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["fickling","ml-model-loading","package","python"],"not_affected_if":["fickling-not-used-as-gate","no-untrusted-pickles"],"how_to_check":"- Check the installed version with `pip show fickling` and compare against the range through 0.1.12.\n- Search code for `fickling.load(` or `check_safety(` used as the gate before `pickle.loads(`.","fix":"- fickling: unknown (the sources state no fixed version; the vendor master branch at commit d011709 was reported still vulnerable).","status":"open","published_at":"2026-10-30T22:16:54+00:00","first_seen_at":"2026-10-30T22:25:56+00:00","triaged_at":"2026-10-30T22:27:06+00:00","updated_at":"2026-10-30T22:27:06+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-30T22:27:06Z","model":"claude-haiku-5-5","output":{"fix":"- fickling: unknown (the sources state no fixed version; the vendor master branch at commit d011709 was reported still vulnerable).","reach":"local","title":"fickling: crafted pickle bypasses safety check and runs code","impact":"high","summary":"Trail of Bits' fickling, a pickle safety scanner, can be fooled by a pickle file with a dotted name that reaches optparse.Values.read_file, which executes code. An attacker who supplies a crafted pickle gets arbitrary code execution on a system that loads it after check_safety() reports it as safe.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","fickling","ml-model-loading"],"confidence":0.8,"fix_status":"none","needs_auth":"no","worst_case":"Arbitrary code runs on the machine loading the pickle.","analyst_note":"Confirm whether a fixed fickling release exists after 0.1.12 and whether the NVD entry or vendor advisory names one; sources give no fix.","how_to_check":"- Check the installed version with `pip show fickling` and compare against the range through 0.1.12.\n- Search code for `fickling.load(` or `check_safety(` used as the gate before `pickle.loads(`.\n- unknown for any other check the sources do not state.","plain_action":"","needs_analyst":true,"not_affected_if":["no-untrusted-pickles","fickling-not-used-as-gate"],"who_is_affected":"Teams that use fickling to decide whether an untrusted pickle is safe before loading it with pickle.loads() are exposed, because the safety gate passes the crafted file. Systems that never load untrusted pickles through fickling, or that do not rely on it as a safety check, are not exposed by this flaw.","user_interaction":"yes","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.00078,"input_tokens":4616,"output_tokens":637,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-10':309C '-118938':12A,15A '-16760':270C '-2026':11A,14A,269C '-30':310C '0.1.12':79C '2026':308C '3':228C '3.13':235C 'achiev':198C 'addit':317C 'address':346C 'allow':178C 'analysi':162C,245C 'analyz':156C 'arbitrari':57B,104C,199C 'attack':50B,180C 'attribut':105C,152C,249C,276C,326C,342C 'attribute-path':248C,275C 'behavior':289C 'bit':25B,76C 'blocklist':316C,336C 'branch':302C 'bypass':4A,292C 'call':159C 'carri':85C 'chain':211C 'check':6A,67B,169C,212C 'class':99C,184C,330C 'close':279C 'code':9A,48B,58B,188C,200C 'commit':304C 'compon':120C 'cpython':227C 'craft':2A,54B,204C 'current':226C 'cve':10A,13A,268C 'd011709':305C 'deprec':231C 'display':141C 'distinct':254C 'dot':40B,87C,247C,274C 'exampl':90C 'exec':193C 'execut':47B,59B,189C,192C,201C 'explicit':218C 'fickl':1A,16B,26B,77C,115C,140C 'fickling.load':209C 'file':37B,45B,92C,148C,191C,333C 'filenam':195C 'find':98C,176C 'fixabl':258C 'flag':166C,273C,323C,338C 'fool':33B 'function':114C 'gate':220C 'get':56B 'getattribut':101C 'global':83C 'heurist':321C 'import':126C,135C,146C,278C 'independ':257C 'instanc':137C 'lead':119C 'leav':283C 'level':113C,287C 'like':172C 'load':20B,64B,207C 'm':139C 'master':301C 'method':185C,331C 'ml':18B 'ml-model-load':17B 'model':19B 'modul':112C,262C,286C 'module-level':111C,285C 'module-origin':261C 'name':41B,123C,251C 'neither':335C 'never':155C 'new':320C 'octob':315C 'open':194C 'oper':131C 'operand':84C 'optpars':145C,221C 'optparse.values.read':44B,190C 'origin':263C 'overtlybadev':161C 'packag':21B 'pass':163C 'path':106C,250C,277C 'perform':187C 'pickl':3A,28B,36B,55B,81C,96C,205C 'pickle.loads':215C 'plain':134C 'present':223C,297C 'privat':324C,341C 'public':329C 'python':22B,138C,234C 'qualnam':88C 'rather':107C 'reach':43B,182C 'read':196C 'record':116C 'refer':153C 'releas':230C 'remain':296C 'remedi':349C 'remov':237C 'render':129C 'report':69B 'resolut':243C 'resolv':94C,271C 'return':171C 'run':8A 'safe':72B,173C 'safeti':5A,29B,68B,170C,213C 'scanner':30B 'secur':219C 'stack':82C 'stdlib':325C 'suppli':52B 'system':62B 'track':127C,266C 'trail':23B,74C,151C 'trust':264C,288C 'unchang':290C 'values.read':91C,147C,332C 'var':197C 'vector':281C 'vendor':300C,313C 'verifi':294C 'weak':239C,265C 'x':229C 'zero':175C","nicknames":[],"mitigations":[],"who_affected":"Teams that use fickling to decide whether an untrusted pickle is safe before loading it with pickle.loads() are exposed, because the safety gate passes the crafted file. Systems that never load untrusted pickles through fickling, or that do not rely on it as a safety check, are not exposed by this flaw.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"none","audience":"developers","plain_action":null,"first_public_at":"2026-10-30T22:16:54+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","cvss_by":"aa17e1a1-c329-4d6e-a1ed-8d0188aea082","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-118938","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118938","severity":null,"published_at":"2026-10-30T22:16:54+00:00","modified_at":"2026-10-30T22:16:54+00:00","first_seen_at":"2026-10-30T22:25:56+00:00","fetched_at":"2026-10-30T22:25: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"}