# CVE-2026-16760 - Fickling check\_safety() bypass: likely\_safe\_imports grants module-origin trust to unvalidated standard library callables

DevFeed: [CVE-2026-16760 - Fickling check\_safety() bypass: likely\_safe\_imports grants module-origin trust to unvalidated standard library callables](<https://devfeed.tech/articles/cve-2026-16760-fickling-check-safety-bypass-likely-safe-imports-grants-module-origin-trust-to-unvalidated-standard-library-callables-109378.md>)

Original publisher: [Read original article](<https://cvefeed.io/vuln/detail/CVE-2026-16760>)

Author: CVEFEED.io

Published: 2026-10-30T21:16:31Z

Content type: news

Language: en

Sources: [Latest High/Critical Vulnerabilitiy Feed](<https://devfeed.tech/sources/latest-high-critical-vulnerabilitiy-feed.md>)

Topics: [execution](<https://devfeed.tech/topics/execution.md>), [modules](<https://devfeed.tech/topics/modules.md>), [import](<https://devfeed.tech/topics/import.md>), [POSIX](<https://devfeed.tech/topics/posix.md>)

Tags: [bypass](<https://devfeed.tech/tags/bypass.md>), [code-execution](<https://devfeed.tech/tags/code-execution.md>), [cve-2026-118938](<https://devfeed.tech/tags/cve-2026-118938.md>), [cve-2026-16760](<https://devfeed.tech/tags/cve-2026-16760.md>), [fickling](<https://devfeed.tech/tags/fickling.md>), [payload](<https://devfeed.tech/tags/payload.md>), [security](<https://devfeed.tech/tags/security.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [trailofbits](<https://devfeed.tech/tags/trailofbits.md>), [trust](<https://devfeed.tech/tags/trust.md>), [write](<https://devfeed.tech/tags/write.md>)

## AI overview

In Fickling through 0.1.12, check_safety() can miss dangerous pickle payloads because it trusts imported names from standard-library modules without validating the callable, and OvertlyBadEvals skips calls to those names. The advisory demonstrates arbitrary code execution via dataclasses._create_fn and mailcap.findmatch on Python versions through 3.12, plus arbitrary-path file writes via readline history functions on supported POSIX platforms. Since fickling.load() uses a LIKELY_SAFE result to proceed to pickle.loads(), a bypass can execute code with the victim process's privileges. The vendor added the three demonstrated modules to UNSAFE_IMPORTS on its master branch, pending release as of Oct. 30, 2026; released versions through 0.1.12 remain affected. The underlying module-origin trust issue is distinct from the __qualname__ weakness tracked separately as CVE-2026-118938.

## Source excerpt

CVE ID :CVE-2026-16760 Published : Oct. 30, 2026, 9:16 p.m. | 38 minutes ago Description :In Trail of Bits fickling through 0.1.12, the _process_import() method in fickle.py adds an imported name to the likely_safe_imports set whenever the source module is present in sys.stdlib_module_names and the name is absent from the UNSAFE_IMPORTS denylist, without inspecting what the name resolves to or how it behaves. The OvertlyBadEvals analysis pass in analysis.py then unconditionally skips any call whose function name appears in likely_safe_imports, including calls that would otherwise be flagged as overtly dangerous. As a result, any callable reachable through a non-blocked standard library module inherits module-level trust regardless of its own behavior, and check_safety() returns LIKELY_SAFE with zero findings for pickle payloads that reach code execution or file write through such callables. Demonstrated primitives: dataclasses._create_fn, which passes an attacker-controlled function body to exec() and yields arbitrary code execution on Python 3.7 through 3.12 (the internal _create_fn function was removed in Python 3.13); mailcap.findmatch, which internally calls os.system() on a test command taken from an attacker-controlled caps dictionary, yielding arbitrary code execution on Python versions through 3.12 (the mailcap module was removed in Python 3.13); and readline.add_history() followed by readline.write_history_file(), which writes attacker-controlled content to an arbitrary filesystem path (POSIX platforms, where the readline module is available). fickling.load() chains check_safety() into pickle.loads() as an explicit security gate, so a LIKELY_SAFE verdict causes the payload to be deserialized and executed with the privileges of the victim process. The root cause is the inference of callable safety from module origin; it is independent of, and separately fixable from, the dotted __qualname__ resolution weakness tracked as CVE-2026-118938, which this advisory