<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Xinference - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/xinference/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Sat, 22 Aug 2026 01:16:40 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/xinference/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>Remote Code Execution in Xinference via Unsafe eval() in Tool-Call Parsing</title><link>https://feed.craftedsignal.io/briefs/2026-08-xinference-rce/</link><pubDate>Sat, 22 Aug 2026 01:16:40 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-08-xinference-rce/</guid><description>Xinference is vulnerable to remote code execution due to the use of Python's unsafe eval() function to parse tool-call outputs generated by LLMs, allowing unauthenticated attackers to execute arbitrary code via prompt injection.</description><content:encoded><![CDATA[<p>Xinference versions 2.5.0 and earlier contain a critical vulnerability, assigned CVE-2026-61539, stemming from the insecure use of Python's <code>eval()</code> function during tool-call parsing. The vulnerability exists within <code>xinference/model/llm/tool_parsers/llama3_tool_parser.py</code>, where the application attempts to process outputs from LLMs into dictionary objects. Because the model output can be manipulated through prompt injection, an attacker can supply malicious Python expressions in their chat completion requests.</p>
<p>The application, upon receiving a response from the model, passes the raw string output directly to <code>eval()</code>. In a default configuration where authentication is disabled, an unauthenticated attacker can interact with the <code>/v1/chat/completions</code> API to trigger this code execution. This allows for full compromise of the underlying server process, including unauthorized data access, system modification, or lateral movement within the network. Defenders must upgrade to a patched version immediately or ensure strict API authentication is enforced for all inference endpoints.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies a target running an unauthenticated Xinference instance (&lt;= v2.5.0).</li>
<li>Attacker crafts a prompt specifically designed to trigger tool-use capabilities in the target LLM.</li>
<li>Attacker embeds a malicious Python payload (e.g., <code>__import__('os').system(...)</code>) within the prompt injection payload.</li>
<li>Attacker sends the crafted request to the <code>/v1/chat/completions</code> REST API endpoint.</li>
<li>The model generates a completion containing the malicious Python expression intended to be interpreted as a tool call.</li>
<li>The <code>xinference</code> application's <code>extract_tool_calls()</code> function receives the model output and passes it to <code>eval()</code>.</li>
<li>The server process executes the malicious payload with the permissions of the Xinference service.</li>
<li>Final objective: Remote code execution for full system compromise, exfiltration, or persistence.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The vulnerability carries a CVSS v3.1 score of 10.0, indicating total compromise of confidentiality, integrity, and availability. Successful exploitation allows an unauthenticated remote attacker to execute arbitrary code within the host operating system. As Xinference is frequently deployed in environments hosting sensitive model data or interacting with internal infrastructure, the impact can extend to internal service discovery and lateral movement.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to a version of Xinference beyond 2.5.0 that removes the use of <code>eval()</code> for tool-call parsing.</li>
<li>Enable mandatory authentication for all exposed API endpoints, specifically the <code>/v1/chat/completions</code> route, to prevent unauthenticated access.</li>
<li>Deploy web application firewall (WAF) rules to detect and block common shell injection patterns in request parameters targeting inference APIs.</li>
<li>Monitor for unexpected child processes being spawned from the Xinference server process (e.g., <code>/bin/sh</code> or <code>cmd.exe</code> spawned by the Python interpreter).</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category></item></channel></rss>