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 does not address. As of 2026-10-30 the three demonstrated modules were added to UNSAFE_IMPORTS on the vendor master branch (commit d011709) pending release; released versions through 0.1.12 remain affected, and the module-origin trust root cause persists, as demonstrated by the related CVE-2026-118938 remaining exploitable on that same build.
Published: 2026-10-30
Score: 8.8 High
EPSS: n/a
KEV: No
Impact: Remote Code Execution
Action: Patch Immediately
AI Analysis

Impact

In Trail of Bits fickling up to version 0.1.12, a flaw in the _process_import() routine assigns an imported name to a set that marks it as likely safe whenever the source module belongs to the standard library and the name is not on an explicit denylist. The tool’s analysis pass then suppresses any call to a function whose name appears in that set, even if the function is itself dangerous. Consequently, any callable reachable through these trusted standard library modules inherits module-level trust, and the safety check reports LIKELY_SAFE with no findings for pickle payloads that exploit the behavior of such callables. The demonstrated primitives—dataclasses._create_fn (executing arbitrary code via exec), mailcap.findmatch (executing commands through os.system), and readline.add_history/write_history_file (writing arbitrary content to a file)—confirm that an attacker can gain remote code execution or file write through a malicious pickle payload.

Affected Systems

The issue affects the Trail of Bits fickling library, specifically releases up through 0.1.12. Vulnerable Python standard library modules involved include dataclasses, mailcap, and readline, all of which are present in Python 3.7 through 3.12; the vulnerable behavior was removed in Python 3.13, but the affected fickling versions remain impacted for those Python releases.

Risk and Exploitability

The flaw carries a CVSS score of 8.8, indicating high severity, and while the EPSS score is not disclosed, the absence of a KEV listing does not diminish the risk. The attack vector is straightforward: any application that deserializes user-supplied data with fickling.load() can trigger the flawed safety gate, resulting in arbitrary code execution with the privileges of the running process. Because the vulnerability stems from incorrectly inferring safety based on module origin, it can be exploited without the need to bypass traditional authentication or privilege boundaries.

Generated by OpenCVE AI on October 30, 2026 at 22:22 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to the latest release of fickling that incorporates commit d011709 and adds the vulnerable modules to the UNSAFE_IMPORTS list.
  • If an upgrade is not feasible, avoid using fickling.load() on untrusted data; instead, employ a secure deserialization mechanism that does not rely on the faulty safety check.
  • Configuring your environment to ensure that standard library modules such as dataclasses, mailcap, and readline are not whitelisted—by reviewing and tightening the UNSAFE_IMPORTS list—will block the exploitation path until a patch can be applied.

Generated by OpenCVE AI on October 30, 2026 at 22:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 31 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Fri, 30 Oct 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Trailofbits
Trailofbits fickling
Vendors & Products Trailofbits
Trailofbits fickling

Fri, 30 Oct 2026 21:30:00 +0000

Type Values Removed Values Added
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 does not address. As of 2026-10-30 the three demonstrated modules were added to UNSAFE_IMPORTS on the vendor master branch (commit d011709) pending release; released versions through 0.1.12 remain affected, and the module-origin trust root cause persists, as demonstrated by the related CVE-2026-118938 remaining exploitable on that same build.
Title Fickling check_safety() bypass: likely_safe_imports grants module-origin trust to unvalidated standard library callables
Weaknesses CWE-502
CWE-693
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Trailofbits Fickling
cve-icon MITRE

Status: PUBLISHED

Assigner: BombadilSystems

Published:

Updated: 2026-10-30T21:16:31.353Z

Reserved: 2026-07-23T14:00:36.878Z

Link: CVE-2026-16760

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-30T22:16:54.193

Modified: 2026-10-30T22:16:54.193

Link: CVE-2026-16760

cve-icon Redhat

Severity : Important

Publid Date: 2026-10-30T21:16:31Z

Links: CVE-2026-16760 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-30T22:30:14Z

Weaknesses
  • CWE-502

    Deserialization of Untrusted Data

  • CWE-693

    Protection Mechanism Failure