Model & ML supply-chain security

Fickling: pickle decompiler and static analyzer

Fickling is a pickle decompiler and static analyzer from Trail of Bits. It is open source under the LGPL-3.0 license and is offered as: CLI, Library.

  • Last reviewed
Open sourceLGPL-3.0 Layer 3: Model and supply chain

Best for

Security researchers and ML engineers who want to read what a pickle file would do, or to block unexpected imports while loading pickles

Consider instead if

  • You want a scanner built around several model formats such as H5 and SavedModel, not only pickle. See ModelScan.

What Fickling does

Fickling is an open-source Python library and command-line tool from Trail of Bits for working with pickle files. It decompiles pickle data into readable Python, and its safety checks use symbolic execution of the pickle machine rather than running the code. It can scan pickles inside model files, including PyTorch files, and a runtime hook checks each import against an allowlist of safe imports while a pickle loads. The README also lists commands to trace execution and to inject code into pickles. It installs with pip, and PyTorch support needs the torch extra. Fickling is released under the LGPL-3.0 license and costs nothing to use.

This summary is our own wording of the sourced facts on this page.

Key facts

Each value links to the page that states it, with the date we checked it.

API reference
Not documented in the sources we checked
Attestations or disclosure
Vulnerabilities are reported privately through GitHub Security Advisories Source, checked October 21, 2026: github.com (opens in a new tab)

Capabilities

As documented by the vendor or project. The tag is our label from a controlled vocabulary.

Where Fickling fits in our AI security layers

Our analysis

Our editorial model, not a standard. The primary layer follows the category, except for tools whose main documented job is detection and response; other layers rest on a capability the sources document. How the model works.

AI security layers that Fickling covers, with the role, how each applies and what it rests on
LayerRoleHow it appliesBased on
L3 Supply chain Model and supply chain Primary Check that models, datasets and AI components from outside are what they claim to be and do not run code or hide backdoors when loaded. Follows its category, Model & ML supply-chain security

OWASP LLM Top 10 mapping

Our analysis

The risk list is OWASP's (Top 10 for LLM Applications, 2025). The mapping is our analysis, and each row rests on a capability the sources document.

OWASP LLM risks mapped to Fickling, with the capabilities each mapping rests on
RiskHow it appliesBased on
LLM03 Supply Chain Analyzes pickle files inside model artifacts and can block unexpected imports while loading them. Decompiles pickle data into Python AST and analyzes it statically, with symbolic execution instead of running the code; Safety checks flag unsafe pickles through check_safety, is_likely_safe and the --check-safety command; Scans pickles inside AI and ML model files, including PyTorch files; Runtime hook checks each import against an allowlist of safe imports and raises an exception on anything else

Alternatives and related tools

More in Model & ML supply-chain security, ranked within the category by Coverage Score.

ModelAudit (Promptfoo)

OpenAI (Promptfoo)

Open sourceMIT
  • CLI
  • Library
  • Self-hosted

Scans model files for malicious code, backdoor indicators and unsafe operations without loading them.

Best for: Teams that want a free scanner covering many model and archive formats, with SARIF output for code scanning in CI

Coverage Score 86 out of 100
  • LLM03 Supply Chain
  • LLM04 Data and Model Poisoning

Reviewed

ModelScan

Palo Alto Networks (Protect AI)

Open sourceApache-2.0
  • CLI
  • Library

Scans saved ML model files for unsafe serialized code before you load them, from a CLI or Python.

Best for: ML and platform teams that want a free scanner to check downloaded or internally produced model files before loading or deploying them

Coverage Score 84 out of 100
  • LLM03 Supply Chain
  • LLM04 Data and Model Poisoning

Reviewed

Open sourceApache-2.0
  • CLI
  • Library

Signs machine learning model files and verifies them later so tampering can be detected.

Best for: Teams that publish or consume models and want a free way to sign model files and check signatures before loading them

Coverage Score 78 out of 100
  • LLM03 Supply Chain
  • LLM04 Data and Model Poisoning

Reviewed

Head-to-head comparisons

Fickling FAQ

Is Fickling open source?

Yes. Fickling is released under the LGPL-3.0 license, and the code is on GitHub at trailofbits/fickling.

How does Fickling check a pickle without running it?

The README says its Pickle Machine symbolically executes the code rather than overtly executing it, which is why analyzing untrusted files is considered safe.

How do you install it?

With pip install fickling. The README says PyTorch support requires the fickling[torch] extra.

Key facts you can cite

We have no commercial relationship with Trail of Bits.

Sources & last reviewed

Last reviewed . We compile from the vendors' own public pages and repositories and we do not run the products. Source links open in a new tab. Found a mistake? Report a correction.