{"id":"CVE-2026-14535","state":"PUBLISHED","title":"Fickling MLAllowlist analysis pass rendered inoperative by shared mutable state in AnalysisContext.shorten_code()","description":"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.","publishedAt":"2026-07-04T13:31:14.937Z","updatedAt":"2026-07-06T14:58:34.718Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"BombadilSystems"},"assigner":"BombadilSystems","products":["trailofbits fickling"],"affected":[{"vendor":"trailofbits","product":"fickling","packageName":"fickling","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"0.1.11","versionType":"custom"},{"version":"0.1.12","status":"unaffected","versionType":"custom"}],"collectionURL":"https://pypi.org/project/fickling/"}],"references":["https://github.com/trailofbits/fickling/security/advisories/GHSA-cffv-grgg-g429","https://github.com/trailofbits/fickling/pull/278","https://github.com/trailofbits/fickling/commit/41ce7cb01edd97072994039574a2301ebb3f463d","https://github.com/trailofbits/fickling/releases/tag/v0.1.12"],"weaknesses":["CWE-693"],"ingestedAt":"2026-10-29T20:11:00.674Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/14xxx/CVE-2026-14535.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-14535","state":"PUBLISHED","datePublished":"2026-07-04T13:31:14.937Z","dateUpdated":"2026-07-06T14:58:34.718Z","assignerShortName":"BombadilSystems","assignerOrgId":"aa17e1a1-c329-4d6e-a1ed-8d0188aea082","dateReserved":"2026-07-03T00:02:55.918Z"},"containers":{"cna":{"title":"Fickling MLAllowlist analysis pass rendered inoperative by shared mutable state in AnalysisContext.shorten_code()","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"trailofbits","product":"fickling","packageName":"fickling","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"0.1.11","versionType":"custom"},{"version":"0.1.12","status":"unaffected","versionType":"custom"}],"collectionURL":"https://pypi.org/project/fickling/"}],"references":[{"url":"https://github.com/trailofbits/fickling/security/advisories/GHSA-cffv-grgg-g429","name":"GitHub Security Advisory GHSA-cffv-grgg-g429"},{"url":"https://github.com/trailofbits/fickling/pull/278","name":"Fix PR #278 — Split shorten_code() formatting from dedup tracking, make MLAllowlist opt-in"},{"url":"https://github.com/trailofbits/fickling/commit/41ce7cb01edd97072994039574a2301ebb3f463d","name":"Fix commit 41ce7cb (squash merge of PR #278)"},{"url":"https://github.com/trailofbits/fickling/releases/tag/v0.1.12","name":"Fickling v0.1.12 release"}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseSeverity":"HIGH","baseScore":8.8,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-693","lang":"en","description":"CWE-693 Protection Mechanism Failure","type":"CWE"}]}],"providerMetadata":{"shortName":"BombadilSystems","orgId":"aa17e1a1-c329-4d6e-a1ed-8d0188aea082","dateUpdated":"2026-07-04T13:31:14.937Z"},"datePublic":"2026-06-28T00:08:00.000Z","impacts":[{"descriptions":[{"lang":"en","value":"An attacker can craft a malicious pickle file that imports any standard library module not in fickling's UNSAFE_IMPORTS denylist. Because the MLAllowlist check is silently skipped due to shared state pollution from UnsafeImportsML, fickling's check_safety() returns LIKELY_SAFE. When used with fickling.load(), the payload is deserialized and arbitrary code executes in the victim's environment. This is distinct from denylist incompleteness (CWE-184) because the allowlist mechanism was specifically designed to catch imports that the denylist misses, and a code defect renders it entirely inoperative."}]}],"credits":[{"lang":"en","value":"Christopher Aziz (Bombadil Systems LLC)","type":"finder"}],"source":{"discovery":"EXTERNAL"},"x_generator":{"engine":"Vulnogram 1.0.2"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/trailofbits/fickling/security/advisories/GHSA-cffv-grgg-g429","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-06T14:58:30.612222Z","id":"CVE-2026-14535","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-06T14:58:34.718Z"}}]}}}