fickling 0.1.12 允許任意程式碼執行的 CVE-2026-118938 漏洞
CVE-2026-118938 - Fickling check_safety() bypass: dotted __qualname__ in STACK_GLOBAL resolves a class-method attribute path that evades call analysis
**此 CVE-2026-118938 漏洞允許攻擊者利用 fickling 解析含 dotted __qualname__ 的 pickle,執行 optparse.Values.read_file 進而任意執行程式碼。
此漏洞允許攻擊者利用 pickle 解析漏洞,實現任意程式碼執行,對使用 fickling 的應用構成嚴重風險,且目前尚未針對此缺陷提供官方修補。請即時升級至已修補版本以消除此漏洞。
譯文尚未完整,完整內容請切換至原文。
在 Trail of Bits 的 fickling 0.1.12 版本中,一個帶有點分隔的 __qualname__(例如 "Values.read_file")的 pickle STACK_GLOBAL 運算元,會透過 pickle 的 find_class 與 _getattribute 被解析為任意屬性路徑,而非模組層級函式。Fickling 只在其匯入追蹤中記錄名稱的首部元件,並將操作呈現為簡單匯入(例如,執行 'python -m fickling' 時顯示為 'from optparse import Values.read_file'),因此尾部屬性參照永遠不會被分析為呼叫。OvertlyBadEvals 分析階段不會將其標示,且 check_safety() 回傳 LIKELY_SAFE 並無任何發現。這使得攻擊者能夠觸及執行程式碼的類別方法:optparse.Values.read_file 執行 exec(open(filename).read(), vars),在經由 fickling.load() 載入自訂 pickle 時達成任意程式碼執行,因為它將 check_safety() 連結至 pickle.loads() 作為明確的安全閘門。optparse 在所有目前的 CPython 3.x 版本中皆存在(於 Python 3.13 起已棄用,但未移除)。此弱點在於對點分隔屬性路徑名稱的解析與分析,且與追蹤為 CVE-2026-16760 的模組來源信任弱點不同且可獨立修復:解析或標示點分隔屬性路徑匯入即可關閉此攻擊向量,同時保留模組層級信任行為。此繞過已在 2026-10-30 時確認仍存在於供應商主分支 d011709 的提交中,經過供應商於十月新增的封鎖清單與一項標示私有 stdlib 屬性的啟發式演算法後;因為公有類別方法 Values.read_file 並未被封鎖或標示為私有屬性,故未被上述修正所涵蓋。
影響
受影響產品
以下產品受到 CVE-2026-118938 的漏洞影響。
即使 cvefeed.io 瞭解受影響產品的精確版本,資訊仍未在下表中呈現。
| ID | 供應商 | 產品 | 行動 |
|---|---|---|---|
| 1 | Trailofbits | fickling |
Common Vulnerability Scoring System(CVSS)是一套標準化框架 用於評估軟體與系統漏洞的嚴重性。 我們從各個來源蒐集並顯示每個 CVE 的 CVSS 分數。
| 分數 | 版本 | 嚴重性 | 向量 | 可利用性分數 | 影響分數 | 來源 |
|---|---|---|---|---|---|---|
| CVSS 3.1 | 高 | aa17e1a1-c329-4d6e-a1ed-8d0188aea082 | ||||
| CVSS 3.1 | 高 | MITRE-CVE |
更新受影響元件以修正任意屬性路徑解析與程式碼執行漏洞。
- 將元件更新至已修補版本。
- 審核並驗證匯入解析邏輯。
- 確保所有屬性路徑均安全解析。
- 請即時套用安全更新與補丁。
此處列出精選外部連結,提供關於 CVE-2026-118938 的深入資訊、實用解決方案與有價值的工具。
| 網址 | 資源 |
|---|---|
| https://bombadil.systems/advisories.html | |
| https://github.com/trailofbits/fickling | |
| https://github.com/trailofbits/fickling/commit/d011709 | |
| https://pypi.org/project/fickling/0.1.12/ |
CVE 識別特定漏洞例項,而 CWE 將可能導致漏洞的共通缺陷或弱點分類。CVE-2026-118938 與以下 CWEs 相關聯:
Common Attack Pattern Enumeration and Classification(CAPEC)儲存攻擊模式,描述攻擊者為利用 CVE-2026-118938 弱點所採用的共通特徵與方法。
我們掃描 GitHub 倉庫以偵測新的概念驗證 (PoC) 攻擊。以下列表為已在 GitHub 釋出的公開攻擊與概念驗證集合(按最近更新時間排序)。
由於潛在的效能問題,結果僅限於前 15 個倉庫。
以下列表為文章中提及 CVE-2026-118938 漏洞的新聞。
以下表格列出 CVE-2026-118938 漏洞隨時間所作的變更。
漏洞歷史細節有助於瞭解漏洞的演變,並辨識可能影響漏洞嚴重性、可利用性或其他特性的最新變更。
-
新 CVE 已接收:aa17e1a1-c329-4d6e-a1ed-8d0188aea082
十月. 30, 2026
動作 型別 舊值 新值 新增 說明 In Trail of Bits fickling through 0.1.12, a pickle STACK_GLOBAL operand carrying a dotted __qualname__ (for example "Values.read_file") is resolved by pickle's find_class through _getattribute to an arbitrary attribute path rather than to a module-level function. Fickling records only the leading component of the name in its import tracking and renders the operation as a plain import (for instance, 'python -m fickling' displays it as 'from optparse import Values.read_file'), so the trailing attribute reference is never analyzed as a call. The OvertlyBadEvals analysis pass does not flag it, and check_safety() returns LIKELY_SAFE with zero findings. This allows an attacker to reach a class method that performs code execution: optparse.Values.read_file executes exec(open(filename).read(), vars), achieving arbitrary code execution when the crafted pickle is loaded through fickling.load(), which chains check_safety() into pickle.loads() as an explicit security gate. optparse is present in all current CPython 3.x releases (deprecated as of Python 3.13, not removed). This weakness is in the resolution and analysis of dotted attribute-path names, and is distinct from and independently fixable from the module-origin trust weakness tracked as CVE-2026-16760: resolving or flagging dotted attribute-path imports closes this vector while leaving the module-level trust behavior unchanged. This bypass was verified to remain present on the vendor master branch at commit d011709 as of 2026-10-30, after the vendor's October blocklist additions and a new heuristic that flags private stdlib attributes; because the public class method Values.read_file is neither blocklisted nor flagged as a private attribute, it is not addressed by those remediations. Added CVSS V3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Added CWE CWE-502 Added CWE CWE-706 Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/118xxx/CVE-2026-118938.json">CVE-2026-118938</a> Added Reference https://bombadil.systems/advisories.html Added Reference https://github.com/trailofbits/fickling Added Reference https://github.com/trailofbits/fickling/commit/d011709 Added Reference https://pypi.org/project/fickling/0.1.12/
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.