{
  "schema": "aidefend-secureflow-metadata-v1",
  "flow_id": "aidefend-research-sf0061-litellm-11070-agent-platform-release-compromise",
  "title": "LiteLLM 1.107.0: An Unrevoked Agent Key Reaches the Signed Release Pipeline",
  "subtitle": "Confirmed October supply-chain incident, using the vendor's October 23 corrected root cause and the independently analyzed startup payload.",
  "summary": "On October 21, LiteLLM, a Python library and gateway for accessing model providers, published a credential-stealing 1.107.0 release through its legitimate build and signing pipeline. The vendor's October 23 investigation traces entry to an unrevoked master key leaked from its experimental Agent Platform, followed by theft of an organization-owner GitHub token. Separate CI runs stole two maintainer tokens. Consumer-side admission of previously approved exact bytes, and revocation at each credential issuer, address boundaries that a valid release signature did not protect.",
  "reviewed": true,
  "import_status": "curated-research",
  "ai_layers": [
    "ai-infrastructure"
  ],
  "risk_impact": [
    "system-compromise-rce",
    "data-exfiltration"
  ],
  "affected_components": [
    "LiteLLM Agent Platform",
    "GitHub CLI OAuth tokens",
    "BerriAI/project-releaser",
    "litellm==1.107.0",
    "Python site-packages startup"
  ],
  "source_research": {
    "provider": "LiteLLM",
    "primary_url": "https://docs.litellm.ai/blog/security-incident-oct-21-2026-attack-chain",
    "published": "2026-10-23",
    "note": "Source-verified AIDEFEND research curation. ATLAS technique annotations are analyst mappings, not an official ATLAS case study."
  },
  "attack_steps": [
    {
      "id": "step-1",
      "title": "Leave the Published Agent Platform Key Valid",
      "zhTitle": "公開的 Agent Platform 主金鑰未被撤銷",
      "summary": "A May 27 public opencode.json commit exposed the master key. The commit was force-pushed away, but the key remained valid. This is exposure and failed revocation, not a model-generated log leak.",
      "zhSummary": "5 月 27 日公開 commit 的 opencode.json 中包含該平台的主金鑰（master key）。開發團隊後續雖以強制推送（force-push）覆寫歷史紀錄以隱藏該 commit，但並未向簽發處撤銷該金鑰；這屬於憑證外洩後未即時撤銷的處置缺失，而非模型回應日誌洩漏。",
      "tactic": "AML.TA0013",
      "technique": "AML.T0055",
      "layout": {
        "x": -1440,
        "y": 0
      }
    },
    {
      "id": "step-2",
      "title": "Read the Organization Owner Token from the Agent API",
      "zhTitle": "從 Agent 管理 API 讀取組織擁有者 token",
      "summary": "On October 10 the valid master key authorized GET /api/v1/managed_agents/agents?limit=100, which returned a human organization owner's unscoped GitHub CLI OAuth token. The service was an experimental agent PR orchestration platform.",
      "zhSummary": "10 月 10 日，攻擊者使用仍有效的 master key 呼叫 GET /api/v1/managed_agents/agents?limit=100，直接取得真人 GitHub 組織擁有者未限縮範圍的 CLI OAuth token。該受侵害的服務為用來協調 agent 建立 Pull Request 的實驗性平台。",
      "tactic": "AML.TA0013",
      "technique": "AML.T0083",
      "layout": {
        "x": -960,
        "y": 0
      }
    },
    {
      "id": "step-3",
      "title": "Exfiltrate GH_TOKEN through a Throwaway CI Run",
      "zhTitle": "透過臨時 CI 流程竊取 GH_TOKEN",
      "summary": "The owner token created a branch workflow in BerriAI/litellm that posted six CI secrets, including a second maintainer's GH_TOKEN, to an attacker endpoint. This token later approved production.",
      "zhSummary": "攻擊者利用擁有者 token 在 BerriAI/litellm 儲存庫建立分支工作流程，藉此將包含第二位維護者 GH_TOKEN 在內的六項 CI secrets 傳送至外部接收端；該 token 隨後被用於正式發布流程的核准。",
      "tactic": "AML.TA0013",
      "technique": "AML.T0055",
      "layout": {
        "x": -480,
        "y": -700
      }
    },
    {
      "id": "step-4",
      "title": "Exfiltrate RELEASE_PLEASE_TOKEN in a Second CI Run",
      "zhTitle": "另以第二次 CI 流程竊取 RELEASE_PLEASE_TOKEN",
      "summary": "A separate BerriAI/litellm-auto branch workflow posted a third maintainer's RELEASE_PLEASE_TOKEN to the same endpoint. It was later used to delete release run records, not to provide the documented production approval.",
      "zhSummary": "攻擊者在 BerriAI/litellm-auto 建立另一個分支工作流程，將第三位維護者的 RELEASE_PLEASE_TOKEN 傳送至同一接收端。該 token 後續被用於刪除發布工作流程的執行紀錄，而非用於已記錄的生產環境發布核准。",
      "tactic": "AML.TA0013",
      "technique": "AML.T0055",
      "layout": {
        "x": -480,
        "y": 700
      }
    },
    {
      "id": "step-5",
      "title": "Override Protection and Replace the Release Source",
      "zhTitle": "覆寫保護設定並替換發布來源",
      "summary": "On October 21 an initial maintainer push was rejected. The owner token overrode protection and changed project-releaser to build from the lookalike Berri-AI/litellm repository at 20535d8f.",
      "zhSummary": "10 月 21 日，攻擊者先以維護者身分推送變更但遭分支保護規則拒絕；隨後直接使用擁有者權限覆寫該保護，將 project-releaser 建置來源修改為名稱極為相似的惡意儲存庫 Berri-AI/litellm（commit 20535d8f）。",
      "tactic": "AML.TA0004",
      "technique": "AML.T0010.001",
      "layout": {
        "x": -480,
        "y": 0
      }
    },
    {
      "id": "step-6",
      "title": "Dispatch and Complete the Staging Build",
      "zhTitle": "觸發並完成預備環境建置",
      "summary": "The owner token dispatched staging with the malicious source. Staging completed and the production pipeline began. The attack used the real release workflow rather than merely uploading an unsigned wheel.",
      "zhSummary": "攻擊者以擁有者 token 觸發預備環境（staging）建置，從惡意來源拉取程式碼並完成建置，隨後正式生產環境管線啟動。整起攻擊利用的是官方正規的發布工作流程，而非僅僅從外部上傳未簽章的套件。",
      "tactic": "AML.TA0004",
      "technique": "AML.T0010.001",
      "layout": {
        "x": 0,
        "y": 0
      }
    },
    {
      "id": "step-7",
      "title": "Approve the Production Environment Gate",
      "zhTitle": "通過正式環境發布審查門檻",
      "summary": "The stolen GH_TOKEN identity approved production. The owner and approval-token branches are both shown for the observed sequence; the vendor notes the owner could instead have removed the approval restriction entirely.",
      "zhSummary": "遭竊取的 GH_TOKEN 所屬身分核准了正式發布。此流程如實呈現已觀察到的「擁有者觸發」與「維護者核准」雙重前提；但官方調查亦明確指出，擁有者身分原本就具備直接移除雙人核准限制的管理權限。",
      "tactic": "AML.TA0004",
      "technique": "AML.T0012",
      "layout": {
        "x": 960,
        "y": 0
      }
    },
    {
      "id": "step-8",
      "title": "Sign and Publish Malicious Wheels and Containers",
      "zhTitle": "簽署並發布惡意 wheel 與容器映像檔",
      "summary": "The legitimate pipeline signed and published seven 1.107.0 wheels around 11:40 UTC and container images at 11:46:56 UTC on October 21. Legitimate producer identity did not make the source benign.",
      "zhSummary": "10 月 21 日約 11:40 UTC，正規發布管線簽署並正式發布了七個 1.107.0 惡意 wheel 套件，隨後於 11:46:56 UTC 發布惡意容器映像檔。合法的發布者身分與數位簽章，並無法保證原始程式碼的安全無害。",
      "tactic": "AML.TA0003",
      "technique": "AML.T0115",
      "layout": {
        "x": 1440,
        "y": 0
      }
    },
    {
      "id": "step-9",
      "title": "Delete Production and Staging Run Records",
      "zhTitle": "刪除正式與預備環境的執行紀錄",
      "summary": "The third maintainer token deleted both release run records after publication. This cleanup branch does not provide a necessary condition for the consumer payload to run.",
      "zhSummary": "第三位維護者的 token 在發布完成後，被用於刪除正式與預備環境的工作流程執行紀錄。這是攻擊者用來清除入侵痕跡的旁支操作，並非使用者端惡意酬載執行的必備前提。",
      "tactic": null,
      "technique": null,
      "layout": {
        "x": 2400,
        "y": 700
      }
    },
    {
      "id": "step-10",
      "title": "Install the Compromised Package or Image",
      "zhTitle": "使用者端安裝遭入侵的套件或映像檔",
      "summary": "A consumer installs an affected wheel or runs an affected image. Approximate package downloads are distribution counts, not a measured number of compromised organizations.",
      "zhSummary": "軟體使用者透過 pip 安裝受影響的 wheel 套件或執行受感染映像檔。公開統計的套件下載次數僅反映軟體的散布規模，不能直接等同於已確認遭入侵的受害組織數量。",
      "tactic": "AML.TA0005",
      "technique": "AML.T0011.000",
      "layout": {
        "x": 1920,
        "y": 0
      }
    },
    {
      "id": "step-11",
      "title": "Run cook.pth on Python Interpreter Startup",
      "zhTitle": "Python 直譯器啟動時自動執行 cook.pth",
      "summary": "Files in the site-packages root include cook.pth, cook.py and sitecustomize.py. Python startup processes the .pth import and launches the stealer; an explicit import litellm is unnecessary.",
      "zhSummary": "安裝至 site-packages 根目錄下的檔案包含 cook.pth、cook.py 與 sitecustomize.py。當使用者啟動 Python 直譯器處理 .pth 檔案時便會自動載入竊密模組，完全無需使用者在程式碼中明確呼叫 import litellm。",
      "tactic": "AML.TA0005",
      "technique": "AML.T0050",
      "layout": {
        "x": 2400,
        "y": 0
      }
    },
    {
      "id": "step-12",
      "title": "Collect Browser, Cloud and AI Credentials",
      "zhTitle": "搜集瀏覽器、雲端與 AI 服務機敏憑證",
      "summary": "The analyzed payload gathers accessible system, browser, developer, cloud and AI secrets and includes a query against LiteLLM_CredentialsTable. Platform-specific failures limit which paths actually execute on each host.",
      "zhSummary": "鑑識分析顯示，惡意程式會自動搜集本機可讀取的系統、瀏覽器儲存區、開發者工具、雲端平台與 AI 模型服務憑證，並包含查詢 LiteLLM_CredentialsTable 的邏輯。不同作業系統上的相容性錯誤，會限制各主機實際成功執行的攻擊分支。",
      "tactic": "AML.TA0013",
      "technique": "AML.T0055",
      "layout": {
        "x": 2880,
        "y": 0
      }
    },
    {
      "id": "step-13",
      "title": "Post Encrypted Stolen Material to the Attacker",
      "zhTitle": "將加密後的遭竊憑證傳送至攻擊者伺服器",
      "summary": "The payload posts collected material to www.litellm.dev/healthcheck. A separate domain.txt remote-loader capability was dormant in the analysis and is not represented as an observed follow-on execution.",
      "zhSummary": "惡意程式將搜集到的機敏資料加密後，回傳至 www.litellm.dev/healthcheck。鑑識報告中提及的另一個 domain.txt 遠端載入功能當時處於休眠狀態，因此未標記為已確認發生的後續執行步驟。",
      "tactic": "AML.TA0010",
      "technique": "AML.T0025",
      "layout": {
        "x": 3360,
        "y": 0
      }
    }
  ],
  "threat_refs": [
    {
      "id": "AML.T0010.001",
      "name": "AI Supply Chain Compromise: AI Software"
    },
    {
      "id": "AML.T0012",
      "name": "Valid Accounts"
    },
    {
      "id": "AML.T0025",
      "name": "Exfiltration via Cyber Means"
    }
  ]
}
