{
  "id": "python/setuptools-cve-2024-6345-remote-code",
  "signature": "setuptools <70.0.0 is vulnerable to CVE-2024-6345: package_index download functions allow remote code execution via crafted package URLs.",
  "signature_zh": "setuptools <70.0.0 存在 CVE-2024-6345 漏洞：package_index 下载函数允许通过构造的包 URL 执行远程代码。",
  "regex": "setuptools\\ <70\\.0\\.0\\ is\\ vulnerable\\ to\\ CVE\\-2024\\-6345:\\ package_index\\ download\\ functions\\ allow\\ remote\\ code\\ execution\\ via\\ crafted\\ package\\ URLs\\.",
  "domain": "python",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "setuptools' package_index module uses `eval()` on untrusted download URLs, enabling RCE when installing from a malicious index.",
  "root_cause_type": "generic",
  "root_cause_zh": "setuptools 的 package_index 模块对不受信任的下载 URL 使用 `eval()`，从恶意索引安装时可导致远程代码执行。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Keeps the vulnerable version in place and exposes the environment to RCE.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "HTTPS does not protect against a malicious index that serves crafted URLs.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Caching is unrelated to the vulnerability.",
      "fail_rate": 0.98,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.98,
      "how": "pip install --upgrade 'setuptools>=70.0.0'",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "pip install pip-audit && pip-audit",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.89,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}