Skip to content
Heist/ feed
Back to feed
Critical

Xinference: Remote code execution via unsafe `eval()` in Llama3 tool-call parsing

Type: advisorySources: OSV

Xinference is an inference API for running open-source, speech, and multimodal models. In 2.5.0 and earlier, Xinference passes attacker-influenced Llama3 tool-call output to eval() in xinference/model/llm/tool_parsers/llama3_tool_parser.py and xinference/model/llm/utils.py. Requests to /v1/chat/completions with a tools field flow through xinference/api/restful_api.py, xinference/model/llm/transformers/core.py, handle_chat_result_non_streaming(), and _post_process_completion() before extract_tool_calls() or _eval_llama3_chat_arguments() evaluates the model-generated Python expression. An unauthenticated remote attacker can influence that output through a crafted prompt and execute commands in the Xinference server process context. This issue is fixed in version 2.7.0.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-61539
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 01:23 UTC · Revision 1

Source evidence

Xinference: Remote code execution via unsafe `eval()` in Llama3 tool-call parsing

core-osv · Original source

Published 21 Aug 2026, 20:37 UTC

Xinference is an inference API for running open-source, speech, and multimodal models. In 2.5.0 and earlier, Xinference passes attacker-influenced Llama3 tool-call output to eval() in xinference/model/llm/tool_parsers/llama3_tool_parser.py and xinference/model/llm/utils.py. Requests to /v1/chat/completions with a tools field flow through xinference/api/restful_api.py, xinference/model/llm/transformers/core.py, handle_chat_result_non_streaming(), and _post_process_completion() before extract_tool_calls() or _eval_llama3_chat_arguments() evaluates the model-generated Python expression. An unauthenticated remote attacker can influence that output through a crafted prompt and execute commands in the Xinference server process context. This issue is fixed in version 2.7.0.

osv:CVE-2026-61539
Complete source record
{
  "id": "0ae3c04d603625f52cd8113d2fee4b51df015e322ca75cb8442dcdcf0206714b",
  "url": "https://osv.dev/vulnerability/CVE-2026-61539",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Xinference: Remote code execution via unsafe `eval()` in Llama3 tool-call parsing",
    "summary": "Xinference is an inference API for running open-source, speech, and multimodal models. In 2.5.0 and earlier, Xinference passes attacker-influenced Llama3 tool-call output to eval() in xinference/model/llm/tool_parsers/llama3_tool_parser.py and xinference/model/llm/utils.py. Requests to /v1/chat/completions with a tools field flow through xinference/api/restful_api.py, xinference/model/llm/transformers/core.py, handle_chat_result_non_streaming(), and _post_process_completion() before extract_tool_calls() or _eval_llama3_chat_arguments() evaluates the model-generated Python expression. An unauthenticated remote attacker can influence that output through a crafted prompt and execute commands in the Xinference server process context. This issue is fixed in version 2.7.0.",
    "evidence": "osv:CVE-2026-61539",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-61539",
      "aliases": [
        "CVE-2026-61539",
        "GHSA-x2rj-828p-hx9m",
        "PYSEC-2026-3946"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/xorbitsai/inference",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "df4c7cba1e647e0508104f028e8fab16f66e60f1"
                },
                {
                  "fixed": "1b3d220f342ce68d34cec4586d9409d457dadc42"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.7.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "1b3d220f342ce68d34cec4586d9409d457dadc42"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "df4c7cba1e647e0508104f028e8fab16f66e60f1"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v2.7.0"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.5.0",
            "v2.4.0",
            "v2.3.0",
            "v2.2.0",
            "v2.1.0",
            "v2.0.0",
            "v1.17.0",
            "v1.16.0",
            "v1.15.0",
            "v1.14.0",
            "v1.13.0",
            "v1.12.0",
            "v1.11.0.post1",
            "v1.11.0",
            "v1.10.1",
            "v1.10.0",
            "v1.9.1",
            "v1.9.0",
            "v1.8.1.rc1",
            "v1.8.1",
            "v1.8.0",
            "v1.7.1.post1",
            "v1.7.1",
            "v1.7.0.post1",
            "v1.7.0",
            "v1.6.1",
            "v1.6.0.post1",
            "v1.6.0",
            "v1.5.1",
            "v1.5.0.post1",
            "v1.5.0",
            "v1.4.1",
            "v1.4.0",
            "v1.3.1.post1",
            "v1.3.1",
            "v1.3.0.post2",
            "v1.3.0.post1",
            "v1.2.2",
            "v1.2.1",
            "v1.2.0",
            "v1.1.1",
            "v1.1.0",
            "v1.0.1",
            "v1.0.0",
            "v0.16.3",
            "v0.16.2",
            "v0.16.1",
            "v0.16.0",
            "v0.15.4",
            "v0.15.3",
            "v0.15.2",
            "v0.15.1",
            "v0.15.0",
            "v0.14.4.post1",
            "v0.14.4",
            "v0.14.3",
            "v0.14.2",
            "v0.14.1.post1",
            "v0.14.1",
            "v0.14.0.post1",
            "v0.14.0",
            "v0.13.3",
            "v0.13.2",
            "v0.13.1",
            "v0.13.0",
            "v0.12.3",
            "v0.12.2.post1",
            "v0.12.2",
            "v0.12.1",
            "v0.12.0",
            "v0.11.3",
            "v0.11.2.post1",
            "v0.11.2",
            "v0.11.1",
            "v0.11.0",
            "v0.10.3",
            "v0.10.2.post1",
            "v0.10.2",
            "v0.10.1",
            "v0.10.0",
            "v0.9.4",
            "v0.9.3",
            "v0.9.2",
            "v0.9.1",
            "v0.9.0",
            "v0.8.5",
            "v0.8.4",
            "v0.8.3.1",
            "v0.8.3",
            "v0.8.2",
            "v0.8.1",
            "v0.8.0",
            "v0.7.5",
            "v0.7.4.1",
            "v0.7.4",
            "v0.7.3.1",
            "v0.7.3",
            "v0.7.2",
            "v0.7.1",
            "v0.7.0",
            "v0.6.5",
            "v0.6.4",
            "v0.6.3",
            "v0.6.2",
            "v0.6.1",
            "v0.6.0",
            "v0.5.6",
            "v0.5.5",
            "v0.5.4",
            "v0.5.3",
            "v0.5.2",
            "v0.5.1",
            "v0.5.0",
            "v0.4.4",
            "v0.4.3",
            "v0.4.2",
            "v0.4.1",
            "v0.4.0",
            "v0.3.0",
            "v0.2.3",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0",
            "v0.1.3",
            "v0.1.2",
            "v0.1.1",
            "v0.1.0",
            "v0.0.6",
            "v0.0.5",
            "v0.0.4",
            "v0.0.3",
            "v0.0.2",
            "v0.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-61539.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:41.180858917Z",
      "provider": "osv",
      "references": [
        "https://github.com/xorbitsai/inference/releases/tag/v2.7.0",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/61xxx/CVE-2026-61539.json",
        "https://github.com/xorbitsai/inference/security/advisories/GHSA-x2rj-828p-hx9m",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-61539",
        "https://github.com/xorbitsai/inference/commit/1b3d220f342ce68d34cec4586d9409d457dadc42",
        "https://github.com/xorbitsai/inference/pull/4786"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-95"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/61xxx/CVE-2026-61539.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-61539",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 509044,
  "published_at": "2026-08-21T20:37:02.633+00:00"
}