/

CVE-2026-22612

Severity:

HIGH RISK

(7.8)

Unsafe Deserialization Detection Bypass in Fickling Pickle

CVE-2026-22612

Analyzed

Vulnerability type

Category:

Unsafe Deserialization Detection Bypass

CWE:

CWE-502

Impact:

Security Tool Evasion and Missed Unsafe Deserialization

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Fickling, a Python pickle decompiler and static analyzer, contained a detection-bypass issue related to incomplete handling of objects constructed via the builtins module.

Under certain conditions, malicious pickle payloads leveraging builtins could evade Fickling's analysis, causing unsafe deserialization patterns to go undetected in security reviews or CI pipelines.

Affected context

This vulnerability affects workflows and tools that rely on Fickling (prior to version 0.1.7) to statically analyze Python pickle payloads for unsafe deserialization behavior.

It is most relevant where:

  • Pickle files are analyzed or scanned as part of security review, code audit, or CI/CD checks
  • Trust decisions about pickle safety are based primarily on Fickling's output
  • Attackers can craft or influence pickle data, including references through builtins

Exploit preconditions

  • Attack surface: Any pipeline, tool, or security process that uses Fickling to determine whether a pickle is safe or malicious.
  • Required access: Ability to submit, store, or modify pickle payloads that will be analyzed by Fickling (e.g., data uploads, artifact repositories, or code review inputs).
  • Trigger point: Running Fickling's decompiler or static analyzer on a malicious pickle that relies on builtins-based constructs.
  • Why exploitation is possible: Fickling's analysis did not fully account for objects or execution paths originating from builtins, allowing certain attacker-controlled constructs to bypass its unsafe deserialization detection logic.

Why this happens

The underlying issue is a detection blind spot within an unsafe deserialization analyzer rather than a direct runtime deserialization bug in Fickling itself.

Fickling attempts to reason about Python pickle opcodes and object graphs to flag potentially dangerous constructs associated with CWE-502: Unsafe Deserialization.

However, its analysis model was incomplete for payloads that leveraged the builtins module, leading to misclassification or non-detection of patterns that could instantiate sensitive or dangerous objects at runtime.

Conceptually, this is an instance of an incomplete security rule-set: the analyzer trusted its own model of what is dangerous, but that model did not fully represent all relevant deserialization behaviors, especially those routed through builtins.

Potential impact

  • Malicious pickle payloads may appear benign when analyzed by Fickling-based tools.
  • Security teams could overlook unsafe deserialization paths in applications that load attacker-influenced pickle data.
  • CI/CD pipelines relying on Fickling may pass artifacts containing dangerous pickle constructs.
  • Organizations may develop a false sense of security about the safety of pickles that exploit builtins-based behavior.

General mitigation guidance

Mitigation focuses on reducing dependence on a single analysis tool and hardening deserialization practices:

  • Treat Fickling (and similar tools) as advisory, not definitive, especially for risk decisions around untrusted pickle data.
  • Avoid deserializing untrusted or semi-trusted pickles; prefer safer, structured formats (e.g., JSON, MessagePack, or custom schemas) where feasible.
  • Constrain runtime environments that must handle pickle data using least privilege, sandboxing, and restricted imports.
  • Introduce an explicit trust boundary for pickle usage: only accept pickles from well-defined, authenticated sources and avoid mixing with user-controlled content.
  • Combine multiple analysis approaches (manual review, additional static/dynamic checks) for high-risk deserialization paths, rather than relying solely on one static analyzer.

How teams detect issues like this

To identify and manage this class of issue:

  • Review security tooling configurations to understand where Fickling is used as a gate for pickle safety.
  • Perform targeted code review for any Python components that call pickle.load, pickle.loads, or similar APIs for untrusted or externally supplied data.
  • Use static analysis rules or grep-based searches to flag direct or indirect uses of pickle deserialization and cross-check them against Fickling's findings.
  • Incorporate policy checks that prevent merging or deploying code that deserializes untrusted pickles, independent of analyzer output.
  • Periodically validate security tools against known-bad test cases to detect blind spots and regressions in detection logic.

Sources

SourceLink
github.comgithub.com/trailofbits/fickling/commit/9f309ab834797f280cb5143a2f6f987579fa7cdf
github.comgithub.com/trailofbits/fickling/releases/tag/v0.1.7
github.comgithub.com/trailofbits/fickling/security/advisories/GHSA-h4rm-mm56-xf63

Frequently asked

questions

Not directly. The vulnerability is about detection bypass: Fickling may fail to recognize some unsafe deserialization constructs, which can indirectly contribute to RCE in applications that incorrectly trust its analysis.

An attacker needs the ability to influence or provide pickle payloads that will be analyzed by Fickling and later deserialized by a target application or system that trusts Fickling's assessments.

Do not treat any single analyzer as authoritative for deserialization safety. Combine strict deserialization policies (e.g., avoiding untrusted pickles entirely), reduced privileges, and defense-in-depth controls with updated tooling that addresses known blind spots.

Regularly test security tools against curated malicious samples, design processes that do not rely solely on static analysis approvals, and architect systems to minimize or eliminate use of dangerous serialization formats like pickle for untrusted data.

Find out what's already
exploitable in your codebase.