# Fickling MLAllowlist analysis can miss non-allowlisted imports

Fickling's MLAllowlist pass silently skips non-allowlisted imports when run after UnsafeImportsML, letting malicious ML pickles pass check_safety as LIKELY_SAFE.

- Payout: Research
- Severity: high
- Program: Fickling
- Found by (vendor credit): Christopher Aziz (Bombadil Systems LLC)
- Found by: reapermunky
- Disclosed: 2026-12-03
- CVE: CVE-2026-14535
- Write-up quality: 7/10
- Original: https://github.com/advisories/GHSA-cffv-grgg-g429
- Library page: https://bugbountylibrary.com/r/ghsa%3AGHSA-cffv-grgg-g429
- Tags: area:oss domain:oss impact:rce kind:research platform:ghsa sev:high tech:python technique:chained technique:source-review vuln:deserialization vuln:misconfiguration

**Target:** Python pickle safety analyzer (MLAllowlist analysis pass)
**Root cause:** UnsafeImportsML.analyze() unconditionally calls context.shorten_code(node) on every import, marking it already_reported in AnalysisContext.reported_shortened_code, which is shared across all passes with no per-analyzer namespace. MLAllowlist then sees already_reported=True and skips its allowlist check.
**Steps:**
1. Build a pickle importing a module not in UNSAFE_IMPORTS and not in ML_ALLOWLIST, e.g. `ast.parse` via StackGlobal/Reduce.
2. Run `MLAllowlist().analyze(AnalysisContext(pickled))` on a fresh context: it flags the import (LIKELY_UNSAFE).
3. Run `UnsafeImportsML().analyze(ctx)` first on the same context, then `MLAllowlist().analyze(ctx)`: returns 0 findings.
4. Run `check_safety(pickled)` full pipeline: returns LIKELY_SAFE with 0 findings, so `fickling.load()` deserializes the payload.
**How found:** Reporter noticed UnsafeImportsML.analyze() calls context.shorten_code(node) on every import, not just flagged ones, and traced that AnalysisContext.reported_shortened_code is shared across passes with no per-analyzer namespace, hypothesizing MLAllowlist would see already_reported=True and skip its check. Confirmed with a three-test PoC isolating fresh-context vs polluted-context vs full-pipeline behavior.
**Exploitation:** Attacker crafts a malicious pickle importing a non-allowlisted stdlib module (e.g. ast.parse); when a victim runs fickling's default check_safety() pipeline, MLAllowlist is silenced by prior UnsafeImportsML pass and the pickle is reported LIKELY_SAFE, so fickling.load() executes it. 139 stdlib modules unblocked.
**Insight:** When auditing multi-pass static analyzers, check whether passes share mutable dedup state (like reported_shortened_code) without per-analyzer namespacing; a pass that marks nodes as 'reported' for its own purposes can silently suppress a later, stricter pass. Test each analyzer in isolation and after other passes to detect order-dependent silencing.

