<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://vulnerability.circl.lu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Mon, 28 Sep 2026 19:59:34 +0000</lastBuildDate>
    <item>
      <title>CVE-2026-47708 — MCP-for-Stata: Command injection via log_file_name parameter in Stata command wrapper</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2026-47708</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; SepineTam stata-mcp&lt;/p&gt;
&lt;p&gt;MCP-for-Stata is an MCP server for Stata to integrate Stata into an agent. Prior to version 1.17.3, the `log_file_name` parameter in the `stata_do` API and CLI is directly interpolated into a Stata command string without sanitization. The security guard (`GuardValidator`) only scans the do-file content but does not validate this parameter. An attacker can inject arbitrary Stata commands (including `shell`, `python`, `erase`, etc.) by crafting a malicious `log_file_name` containing quotes, newlines, or Stata command separators. Version 1.17.3 contains a patch for the issue.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; SepineTam stata-mcp&lt;/p&gt;
&lt;p&gt;MCP-for-Stata is an MCP server for Stata to integrate Stata into an agent. Prior to version 1.17.3, the `log_file_name` parameter in the `stata_do` API and CLI is directly interpolated into a Stata command string without sanitization. The security guard (`GuardValidator`) only scans the do-file content but does not validate this parameter. An attacker can inject arbitrary Stata commands (including `shell`, `python`, `erase`, etc.) by crafting a malicious `log_file_name` containing quotes, newlines, or Stata command separators. Version 1.17.3 contains a patch for the issue.&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2026-47708</guid>
    </item>
    <item>
      <title>GHSA-4p62-hqp5-g644 — MCP-for-Stata: Command injection via log_file_name parameter in Stata command wrapper</title>
      <link>https://vulnerability.circl.lu/vuln/ghsa-4p62-hqp5-g644</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; PyPI: stata-mcp&lt;/p&gt;
&lt;p&gt;### Summary
The `log_file_name` parameter in the `stata_do` API and CLI is directly interpolated into a Stata command string without sanitization. The security guard (`GuardValidator`) only scans the do-file content but does not validate this parameter. An attacker can inject arbitrary Stata commands (including `shell`, `python`, `erase`, etc.) by crafting a malicious `log_file_name` containing quotes, newlines, or Stata command separators.&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;In `src/stata_mcp/stata/stata_do/do.py`, both `_execute_unix_like` and `_execute_windows` construct a Stata command string using Python f-strings:&lt;/p&gt;
&lt;p&gt;```python
commands = f&amp;#34;&amp;#34;&amp;#34;
capture log close
{self.generate_log_command(log_file, is_replace)}
...
do &amp;#34;{dofile_path}&amp;#34;
...
&amp;#34;&amp;#34;&amp;#34;
```&lt;/p&gt;
&lt;p&gt;The `generate_log_command` method returns:&lt;/p&gt;
&lt;p&gt;```python
log_cmd = f&amp;#39;log using &amp;#34;{log_file.as_posix()}&amp;#34;, {replace_clause} {log_type} name({log_type}_log)&amp;#39;
```&lt;/p&gt;
&lt;p&gt;Where `log_file` is constructed from user-supplied `log_name`:&lt;/p&gt;
&lt;p&gt;```python
def generate_log_file(self, log_name: str, extension=&amp;#39;log&amp;#39;):
    return self.log_file_path / f&amp;#34;{log_name}.{extension}&amp;#34;
```&lt;/p&gt;
&lt;p&gt;The `log_name` parameter comes directly from user input (via MCP tool `stata_do` or CLI `stata-mcp tool do`) without any validation. Since the path is embedded inside double quotes in a Stata command string, an attacker can break out of the string context and inject arbitrary commands.&lt;/p&gt;
&lt;p&gt;Additionally, `generate_log_file` does not prevent path traversal via `log_name`, allowing arbitrary file write outside…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; PyPI: stata-mcp&lt;/p&gt;
&lt;p&gt;### Summary
The `log_file_name` parameter in the `stata_do` API and CLI is directly interpolated into a Stata command string without sanitization. The security guard (`GuardValidator`) only scans the do-file content but does not validate this parameter. An attacker can inject arbitrary Stata commands (including `shell`, `python`, `erase`, etc.) by crafting a malicious `log_file_name` containing quotes, newlines, or Stata command separators.&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;In `src/stata_mcp/stata/stata_do/do.py`, both `_execute_unix_like` and `_execute_windows` construct a Stata command string using Python f-strings:&lt;/p&gt;
&lt;p&gt;```python
commands = f&amp;#34;&amp;#34;&amp;#34;
capture log close
{self.generate_log_command(log_file, is_replace)}
...
do &amp;#34;{dofile_path}&amp;#34;
...
&amp;#34;&amp;#34;&amp;#34;
```&lt;/p&gt;
&lt;p&gt;The `generate_log_command` method returns:&lt;/p&gt;
&lt;p&gt;```python
log_cmd = f&amp;#39;log using &amp;#34;{log_file.as_posix()}&amp;#34;, {replace_clause} {log_type} name({log_type}_log)&amp;#39;
```&lt;/p&gt;
&lt;p&gt;Where `log_file` is constructed from user-supplied `log_name`:&lt;/p&gt;
&lt;p&gt;```python
def generate_log_file(self, log_name: str, extension=&amp;#39;log&amp;#39;):
    return self.log_file_path / f&amp;#34;{log_name}.{extension}&amp;#34;
```&lt;/p&gt;
&lt;p&gt;The `log_name` parameter comes directly from user input (via MCP tool `stata_do` or CLI `stata-mcp tool do`) without any validation. Since the path is embedded inside double quotes in a Stata command string, an attacker can break out of the string context and inject arbitrary commands.&lt;/p&gt;
&lt;p&gt;Additionally, `generate_log_file` does not prevent path traversal via `log_name`, allowing arbitrary file write outside…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/ghsa-4p62-hqp5-g644</guid>
    </item>
  </channel>
</rss>
